I have a simple form for leads, if can I redirect the mail.php page back to the form if a varialbe is not set?
Something like this should work <?php if (!isset($_POST['variable_name'])) { header('Location: http://www.yourdomain.com/mail.php'); } ?> PHP:
You don't have to use the isset command, you could just say !$_POST['variable_name'] <?php if(!$_POST['varible_name']) { header("Refresh: 0; url=http://siteurl.com/mail1.php"); } ?> PHP:
Beware of the headers already sent error that sometimes comes up. Just make sure you don't output anything before you issue a header redirect.