Hi All
New to the forum, new-ish to PHP and currently stuck (obviously!)
I am running a multi-page form, which collects data to print out a PDF. All things seem to be working fine. However, I have just set up a beta site and things are not as they should be.
The problem is the form validation.
On my local site (IIS - PHP v5.0.4) and live site (PHP v4.3.2), everything is good.
On submission of the first page, my beta site (PHP v5.1.2) seems to read the previous pages data as $_POST data.
My validation is as follows
each page uses the same validation - a form object
<in put type="hidden" name="process" value="1">
which should stop the page processing any data with this check
if (isset($POST['process']) && $POST['process'] == '1')
{
// process form data validation
header ("Location: nextpage.php");
exit();
}
else
{
display form
}
So, this works fine on my IIS site and LIVE site. If the submit button is pressed, the form goes through the validation and, if correct, moves to the next page. The next page display a clean blank form, and everyone is a happy bunny. 🙂
However, on my new BETA site, when submitting the first page, the second page seems to attempt to process the form instantly, and runs through the validation script. It seems to read the previous pages 'process' variable in error.
I'm not really up on headers etc, but I wonder if anyone recognises this behaviour, and can suggest a solution!?
Thanks in advance
Paul