I have following code:
<input type="hidden" name="qz_id" value="<?=$quizid; ?>" />
<input type="hidden" name="s_id" value="<?=$s_id; ?>" />
<? if($num!=$i) {?><input type="submit" value="Next" /><? } ?>
<? if($num==$i) {?><input type="submit" name="submit" value="Finish" /><? } ?>
This is the part of whole page of code. What i am trying to do is insert these values in database. Can you tell me how can i get value of textbox “answer” and store it in a php variable? I want to insert this value into database once user press next or finish?
Here is the form:
<form id="formresp" method="post" action="respond.php?quiz_id=<?=$quizid ?>" name="register" onsubmit='return ValidateForm(this)'>
Also i triend $_POST[‘answer’] it is not working
You can also use $_REQUEST[‘answer’];. I sort of a $_POST and $_GET.