General way I do this is...
like this. Call this samepage.php...
<?php
do {
if (!isset($mode)) // mode wasn't set, print form
break;
if (!emailaddressvalid($email)) // you need to write this fun
break;
mailmessage($email); // ditto, this will email to the user
header("location: otherpage.php"); // done, redirect
}while (0);
?>
<HTML>
<BODY>
<FORM action="samepage.php" method=GET>
<INPUT type=hidden name=mode value=1>
<input type=text name=email size=64>
<input class=cFF type=submit value="OK">
</FORM>
</BODY>
</HTML>
RW
===========================================
http://badblue.com
Small footprint P2P web server for Windows,
File-sharing, PHP, wireless apps & more
===========================================