All Questions
1,588
questions
13
votes
2
answers
86k
views
Send html form data to sql database via php (using mysqli)
I want to send the data inputted into an html form to my sql database, i.e., create a new row attributing certain values to certain columns. I know there are similar questions, I read the answers but ...
9
votes
2
answers
36k
views
Update database data with submit button
I want to update a database so that when you put your text in a text box and click the submit button, the data will be sent to the database with a specific id. It is clear what I want to do in the ...
8
votes
3
answers
750
views
Errors appearing in mysqli code and call_user_func_array() [duplicate]
I am getting quite a few errors when trying to create a dynamic where clause using mysqli:
Warning: Parameter 2 to mysqli_stmt::bind_param() expected to be a
reference, value given in ... on line ...
8
votes
2
answers
505
views
positioning by percentage in a foreach
I have a page that looks like this right now:
and the code for this is:
<?php
$count_axle = $database->count_axles($_GET['train_id']);
foreach($count_axle as $counting){
}?>
...
6
votes
2
answers
653
views
It is not inserting data into database
I want to insert data into Image_Question Table. but it does not perform an insert in the Image_Question Table.
I am getting two errors:
Notice: Undefined offset: 0 in ... on line 305
Notice: ...
6
votes
5
answers
2k
views
PHP & MySQLi - Show selected value two time in drop-down list
I created my profile page with show all data in form from MySQL. All data is show rightly on form and also in drop-down list. But the problem is selected value is shows two time in the option list.
...
6
votes
1
answer
133
views
The best way to insert an integer into my table using previous/next buttons
I have a slideshow where the user can click a button with an arrow on it pointing to go next and previous. When the user clicks on the arrow I want to save a page name in there, so it will redirect ...
5
votes
9
answers
2k
views
HTML form not sending data to MySQL using PHP
I have a form in HTML, but it's not setup like normal I guess. I'll post the code form the HTML (PHP) file and the php to send it to the db.
<form action="upload.php" method="POST">
<!-- ...
5
votes
2
answers
232
views
displaying incorrect answer from options
DB Table Structure:
Session Table (aka Exam Table)
SessionId(auto) SessionName
137 XULWQ
Question Table:
SessionId QuestionId OptionId
137 1 5
137 2 ...
4
votes
2
answers
7k
views
Move position of MySQL row up/down using php
I am fetching my page's menu from a MySQL table as an unordered list <ul></ul> ORDERERED BY their position, Here is my MySQL table's screenshot
I want my query to work in a way like ...
4
votes
1
answer
436
views
MYSQL order by like/dislikes and popularity
I have table of comments which includes likes and dislikes, now i have problem with proper order..
Actually my system shows comments with greatest amount of likes on top.
I'm looking for something ...
4
votes
3
answers
412
views
MySQLi: Query with a variable to another table
So, I have a database with a few tables in it. Most of these tables contain information about the same document and are connected by an ID (it's stupid since it could all be in the same table, but the ...
4
votes
1
answer
53
views
Giving different web users (admin, customer) different menu views for creating a new account
I have a website with two levels of access, Administrator and Customer. When creating a new account, I want the admin to see the option for making another admin or a customer. I want the customer to ...
4
votes
1
answer
750
views
Grouping database entries into dynamic HTML tables
I have a database where teams will have multiple entries each with different locations. Each entry will have a team name. So for example, team1 might appear several times but each time the location ...
4
votes
1
answer
280
views
How to stay connected with MySQLi from php
I'm setting up a new website and i want to enter some registrations in my MySQLi database.
I want to stay connected with the DB and not to making a new connection every time in a sub-page.
In the ...