Some PHP help

When you want php to do something under one condition, and something else under another, but you don't want to put it all in php, Dont' use
if(condition){ ....}
else{ ....}
Just do this:
<?php
if(condition):
php code blah blah php functions blah blah
?>

Everything here appears if the condition above was met. So, if the above condition is "if($Submit)", then everything here is what the user sees AFTER a form is submitted. This is where it might say, "Thanks for filling out the form, here are some links..." or something.
This can contain regular HTML.
<?php else: ?>
Everything here is what the user sees if the above condition hasn't been met (yet), like arriving to a page with a form. This is where your actual form would go. Set form action to "<? echo $_SERVER['PHP_SELF']; ?>", or to the filename of the page. The form action has to be the same page if the code that handles the form is above.
This area would also contain HTML.

<?php endif; ?>
Everything below here will appear on the page no matter what. Before form submit, after form submit refresh, etc.
By the way - Above, where condition might be if (isset($_POST['Submit'])):, the "Submit" is case sensitive! Make sure your submit button value matches.
This area would also contain HTML.

See an example of this implemented for a mail form

Press H for TWebMan Home |J for JavaScript | P for Make A Perl Script