I have the following code:
if ($submit) {
// process form
echo "Yes I'm inside second if";
} else{
// display form
?>
<form name='RegistrationForm' method='post' action='<?php $_SERVER[PHP_SELF]?>' >
First name: <input type="Text" name="UIFName"><br>
Last name: <input type="Text" name="UILName"><br>
E-Mail: <input type="Text" name="UILogonID"><br>
Password: <input type="Text" name="UIPassword"><br>
<input type="Submit" name="submit" value="Create Logon">
</form>
<?php
} // end if
?>
I believe that once I click on the submit button I should come back into this page and enter the "if ($submit)" statement. However, this does not seem to happen. When I click on the button the fields are cleared and displayed but the echo in the "if($submit)" statement is never shown.
Any ideas on what is going wrong?