Jump to content

Redirect after php script executes...


pemdas21

Recommended Posts

Okay, anyone remember that webmail form? If not, this oughta jog your memory...

[code]<?PHP
if (isset($_POST['Email']) && isset($_POST['Person']) && isset($_POST['Message']) && isset($_POST['Subject'])) {
    $Email  = $_POST['Email'];
    $Person = $_POST['Person'];

}
if ($Person == "John Doe") {
$mailto = "[email protected]";
}
if ($Person == "Jo Shmoe") {
$mailto = "[email protected]";
}}


// repeat the above If statement as many times as the persons
$mailsubj = $HTTP_POST_VARS['Subject'];
$Message = $HTTP_POST_VARS['Message'];
$mailhead = "$Email\n";
$mailbody = "$Message\n";
echo "\n";
echo "Email sent through our Web Mail form\n";
mail($mailto, $mailsubj, $mailbody, $mailhead);
?>[/code]

I have a hidden form field named redirect that has a value of http://www.orrita.com/
How do I make the script redirect... Help?
Link to comment
https://forums.phpfreaks.com/topic/33184-redirect-after-php-script-executes/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.