Forum Moderators: coopster
I'm trying to have a form on my site redirect to a specific html page upon successful submission. However I'm not sure how to add a link in php code. Here is my code
Thanks
<?php
if ($_SERVER['REQUEST_METHOD']=="POST"){
$msg="Values submitted by the user:\n";
foreach($_POST as $key => $val){
if (is_array($val)){
$msg.="Item: $key\n";
foreach($val as $v){
$v = stripslashes($v);
$msg.=" $v\n";
if (!session_is_registered("SESSION")){
$errors[] = "Invalid form submission";
}
}
} else {
$val = stripslashes($val);
$msg.="$key: $val\n";
}
}
$recipient="someone@aol.com";
$subject="Sign up";
error_reporting(0);
if (mail($recipient, $subject, $msg)){
echo "<h1>Thank you</h1><p>Message successfully sent You may close the browser or link to another page:</p>\n"; Trying to change this to a link
echo nl2br($input);
} else
echo "An error occurred and the message could not be sent.";
} else
echo "Bad request method";
if(preg_match("/\rĶ\n/",urldecode($from))){
$errors[] = "Invalid form submission";
}else{
$headers = "From: $from";
}
?>