Error checking on large forms
Hey there folks. Small thing here.
I have a form containing around 100 variables for database insertion. Each user is logged in using basic Session techniques, so nothing overly fancy. I have, however, had some issues with sessions in the past, especially with the size of the form. Occassionally the Session will die suddenly on the form posting and it is infuriating to have to go back and re-do the whole form.
What I'm doing to try and counter this is basically checking at the insert if the user name and password is set and correct. That's simple enough. However, should it not be correct,rather than simply filling the gaps on the form (which would take a bit of work to modify it all) I want to simply pass on the variables and only require the username and password to be entered again.
Now for the question. What is the easiest way to pass on the variables again? What I'm using now is basically this;
foreach($HTTP_POST_VARS as $key => $value) {
echo "<input type=hidden name=$key value=$value>
";
}
but I'm wondering if there is a better and more effective way to pass on everything.
