Now here is the contact_form.php:<form METHOD=POST ACTION="contact_form.php">
My question is, is there a way at the end of this code:<?
// THIS IS THE BEGIINNING OF THE PHP CODE
$name = @$HTTP_POST_VARS['name'];
$address = @$HTTP_POST_VARS['address'];
$state = @$HTTP_POST_VARS['state'];
$city = @$HTTP_POST_VARS['city'];
$zip = @$HTTP_POST_VARS['zip'];
$country = @$HTTP_POST_VARS['country'];
$phone = @$HTTP_POST_VARS['phone'];
$email = @$HTTP_POST_VARS['email'];
$comments = @$HTTP_POST_VARS['comments'];
$fax = @$HTTP_POST_VARS['fax'];
$error_msg="";
$msg="";
if(!$name){
$error_msg .= "Your name \n";
}
if($name){
$msg .= "Name: \t $name \n";
}
if(!$address){
$error_msg .= "Your address \n";
}
if($address){
$msg .= "Address: \t $address \n";
}
if(!$city){
$error_msg .= "Your City \n";
}
if($city){
$msg .= "City: \t $city \n";
}
if(!$state){
$error_msg .= "Your State \n";
}
if($state){
$msg .= "State: \t $state \n";
}
if(!$country){
$error_msg .= "Your country \n";
}
if($country){
$msg .= "Country: \t $country \n";
}
if(!$zip){
$error_msg .= "Your zip \n";
}
if($zip){
$msg .= "Zip: \t $zip \n";
}
if(!$phone){
$error_msg .= "Your phone \n";
}
if($phone){
$msg .= "Phone: \t $phone \n";
}
if(!$email){
$error_msg .= "Your email \n";
}
if($email){
if(!eregi("^[a-z0-9_]+@[a-z0-9\-]+\.[a-z0-9\-\.]+$", $email)){
echo 'That is not a valid email address. Please<a href="javascript:history.back()"> return </a> to the previous page and try again.';
exit;
}
$msg .= "Email: \t $email \n";
}
if($fax){
$msg .= "Fax: \t $fax \n";
}
if($comments){
$msg .= "Comments: \t $comments \n";
}
$sender_email="";
if(!isset($name)){
if($name==""){
$sender_name="Web Customer";
}
}else{
$sender_name=$name;
}
if(!isset($email)){
if($email==""){
$sender_email="Customer@website.com";
}
}else{
$sender_email=$email;
}
if($error_msg != ""){
echo"You didn't fill in these required fields:<br>"
. nl2br($error_msg) .'<br>Please <a href="javascript:history.back()"> return </a> to the'
." previous page and try again.";
exit;}
$mailheaders = "MIME-Version: 1.0\r\n";
$mailheaders .= "Content-type: text/plain; charset=iso-8859-1\r\n";
$mailheaders .= "From: $sender_name <$sender_email>\r\n";
$mailheaders .= "Reply-To: $sender_email <$sender_email>\r\n";
mail("support@hotmail.com","Contact form at Hotmail.com",stripslashes($msg), $mailheaders);
echo "<html> <head> <title>Thanks For Your Submission
</title>
</head>
<body>
<h2>Thank you for your feedback $name</h2>
";echo '<b>This is the information you submitted</b> <br>';echo nl2br(stripslashes($msg));echo '<br><br></body></html>';
//THIS IS THE END OF THE PHP CODE ?>
that I can make this part go to another PHP page<html> <head> <title>Thanks For Your Submission
</title>
</head>
<body>
<h2>Thank you for your feedback $name</h2>
";echo '<b>This is the information you submitted</b> <br>';echo nl2br(stripslashes($msg));echo '<br><br></body></html>';
What happens is after you hit the submit button on the form, the "Thank you for your feedback" page goes to a blank page with the info the user submitted. What I want is for the info to go to my page so it looks like part of my site and not just a white page
This is what I placed on my own page
Does this make sense? I would appreciate any help<h2>Thank you for your feedback $name</h2>
";echo '<b>This is the information you submitted</b> <br>';echo nl2br(stripslashes($msg));echo '<br><br>
Craig