How do you go about retaining selections in check boxes and select boxes when you are error checking a page?
I have it set up so it re-prints the page with the error message if there is something wrong with it, I would like to be able to keep selections as well as text, so they don't have to go through re-ticking and re-selecting all their choices, how do I do this?
Also, is it possible to show more than one error at a time?
at the moment I'm doing it this way
so the whole page is printed out as a function, and I break in and out of print to use the php commands. It works well, but I'm not sure how to show more than one error, or how to retain the select box and checkbox selections.
----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..
I have it set up so it re-prints the page with the error message if there is something wrong with it, I would like to be able to keep selections as well as text, so they don't have to go through re-ticking and re-selecting all their choices, how do I do this?
Also, is it possible to show more than one error at a time?
at the moment I'm doing it this way
Code:
<input type=\"text\" name=\"email\" value=\""; ?><?= $email ?><?php print "\" size=\"30\" maxlength=\"50\">
"; ?> <?= $errormessage ?> <?php print "
so the whole page is printed out as a function, and I break in and out of print to use the php commands. It works well, but I'm not sure how to show more than one error, or how to retain the select box and checkbox selections.
----------------------------------------
Sometimes, when my code just won't behave, I take it outside and make it listen to britney spears music, and when it comes back it's really well behaved. I wonder if it's suffering from post tramatic stress syndrome now..