What is the best way to process a form when you want to display the results on a different page & keep the session variables?
I have a form that I’m trying to process and if the user does not enter required information in certain fields they are kept at the same page with the error displayed about which required fields they need to fill out before they can proceed.
So, I’m trying to post the info from edit.php to results.php. My form action on edit.php is edit.php & then I’m using header() in an if/then statement if all variables are filled out.
But when I try to redirect with header() my session variables don’t convert, nor does the $_POST variables convert.
Is there a better way to do this without having to query the database to restore all my variables or is this the best way to process the form?