Same Code In 2 Different Pages Behaves Differently In Each
I have a series of three pages such that each, when submitted, calls the next one. The first page calls the second one correctly, but the second one calls only itself. Both are using the same code.
The form code for the first page is:
<form name="form1" method="post" onSubmit="return show_message();" action="<?php echo $_SERVER['PHP_SELF']; ?>">
At the top of the page is the following php script:
In the first page (the one that works):
if (isset($_POST['submit']))
{
echo '<META http-equiv="refresh" content="0;URL=WOTCPg2.php">'; // This works
// header('Location: WOTCPg2.php'); // This was tried but didn't work
}?>
When the Submit button is pressed, the above code displays the next page, as it should.
The form code for the second page is:
<form method="post" name="QstnrPg1" id="QstnrPg1" action="<?php echo $_SERVER['PHP_SELF']; ?>">
In the second page is the following php script:
<?php
if (isset($_POST['submit']))
{
// header('Location: BlankIOD.php'); // this was tried but didn't work
echo '<META http-equiv="refresh" content="0;URL=BlankIOD.php">'; // This doesn't work either (???)
} else
Other code that executes (correctly) when the form loads}
When the Submit button here is pressed, the form simply refreshes itself. I can't understand why this is happening, since both pages have essentially the same code. Can anyone tell me what I'm missing or doing wrong?
