-
update multiple values using php and mysql?
over 8 years ago
-
about 8 years ago
First, to get answer for multi-choice question, you need to have either check box, radio button, single select or multi select, but I didn't see you have any of these format in your codes.
Second, no matter which format you would use, you need to code (a loop), either in your main or function, to get the value(s) associated with the answer(s) from user.
Last but not least, recommend to use PDO instead mysqli.
Will post example if request.
Good luck ;)
-
-
over 8 years ago
I just go through your code and i can see a form for questions and answers. you are using for loop to display the answers but i am unable to understand the code flow. What is working of this line? $count = count($_POST['answer']);
Whenever page load first time then there should not be a post request. If there is no post request then you can not display the answers. Kindly clear the code flow.
Thank You
Deepak Verma
Sr. Software Engineer
-
2 Answer(s)