I have a form that I have built for submitting a long list of information from the user.
If there is a problem that got missed by the javascript validation I would like to catch the error on the server-side with a function I have in the form handler script. Then when they have to go back to the form, it is populated with the information that they had already typed in without having to re-type it again.
The problem is I would think the best way to do this is to create a session variable for each of the fields in the $POST array. Then on the form itself, use the value = '{$SESSION['fieldname']}' to populate the fields when they hit the back button.
I read that ARRAY_MERGE() does not work.
I am working on a system that we do not know exactly what is already in $SESSION array (we are basically hacking an existing system) so we need to leave the $SESSION array intact, but add in the $_POST array.
How do I do this easily without spelling out each and every variable explicitly on the form and placing it into the session array?
Any help or suggestions would be apprecaited
-Tony