|
Posted by Jerim79 on 04/11/07 20:38
For the moment, the biggest question before me, is how to make it so
that the user doesn't have to recheck each line if the form fails to
verify. Here is an idea. What if upon submission, I were to exclude
any questions from the form that were already answered correctly? Such
that the first time through, it prints out all questions. Upon
submission it verifies each variable. If all the variables contain
data, then we move on to the next page. If a variable contains no
data, then we repost the question to the user. Within the "IF
($error>0)" I could wrap each occurrence of a question with an IF
statement to see if data for that variable has already been entered.
If not, then it prints the question. If so, it skips on to the next
IF.
You say not to use $Variable1=$_POST['Variable1']. But after
correcting the problem questions, how would I pass along the value for
the correct questions as well? Usually I use hidden buttons on the
form to send along values. Let's say I have three radio groups, A, B
and C. User picks an answer for A and C but skipped B. When the form
validates, and reprints question B, how would I include the value of A
and C so that when the user clicks submit for the second time, the
previous values are not over written? Does isset() maintain its status
throughout all submissions? (As far as I know, PHP can only hold one
form at a time. If you submit another form, then the values of that
form overwrite the previous form.)
Navigation:
[Reply to this message]
|