on this page I have some forms down the right side...
http://www.ohioinsureplan.com/new.php
but when you submit the forms they send the data but the page freezes before forwarding to the header thankyou.php page. These forms were working fine the other day but now it won't forward to the thankyou.php page like before. Why is this happening?
Here is the code for the forms...
<?php
$message1="";
if ( isset( $actionflag ) && $actionflag=="contact")
{
if ( empty( $form[email] ) ) {
$message1 .="Please enter your email address <br>\n";
}
else if (ereg(".@...*",$form[email])){
$message1 .="";
}
else
{
$message1 .="Incorrect email address format<br>\n";
}
}
if ($message1 == "" )
{
if(isset($form['email'])){
$receiver = "jhyers2000@yahoo.com, inquiries@ohioinsureplan.com";
$email = $form['email'];
$name = $form['name'];
$phone = $form['phone'];
$product = $form['product'];
$ip = $REMOTE_ADDR;
$browser = $_SERVER['HTTP_USER_AGENT'];
$headers = "MIME-Version: 1.0";
$headers .= "Content-type: text/html; charset=iso-8859-1";
$headers .= "From: ".$email."";
$sendto = "$form[email]";
$subject = "Ohio Insurance Plan Inquiry";
$message3 = "Thank you for your recent inquiry to Ohio Insurance Plan. We will have an agent contact you by phone or e-mail shortly.
Sincerley,
O.I.P.
http://www.ohioinsureplan.com";
$from = "inquiries@ohioinsureplan.com";
$message =
"You have received an email requesting information from the homepage select box (Ohio Resident Box) from this email address: $email\n" .
"Customer Name: $name\n".
"Customer Phone Number: $phone\n".
"Product the customer selected: $product\n".
"IP: $ip\n".
"Browser: $browser";
mail($receiver, "Home Page Quote Request", $message);
mail($email,$subject,$message3,'from:' .$from);
header( "location: /thankyou.php" );
exit;
}
}
/ Begin Here The Second Form2 /
$message2="";
if ( isset( $actionflag ) && $actionflag=="contact2")
{
if ( empty( $form2[email] ) ) {
$message2 .="Please enter your email address <br>\n";
}
else if (ereg(".@...*",$form2[email])){
$message2 .="";
}
else
{
$message2 .="Incorrect email address format<br>\n";
}
}
if ($message2 == "" )
{
if(isset($form2['email'])){
$receiver = "jhyers2000@yahoo.com, inquiries@ohioinsureplan.com";
$email = $form2['email'];
$name = $form2['name'];
$ip = $REMOTE_ADDR;
$browser = $_SERVER['HTTP_USER_AGENT'];
$headers = "MIME-Version: 1.0";
$headers .= "Content-type: text/html; charset=iso-8859-1";
$headers .= "From: ".$email."";
$sendto = "$form2[email]";
$subject2 = "Ohio Insurance Plan Inquiry";
$message4 = "Thank you for your recent inquiry to Ohio Insurance Plan. We will have an agent contact you by phone or e-mail shortly.
Sincerley,
O.I.P.
http://www.ohioinsureplan.com";
$from = "inquiries@ohioinsureplan.com";
$message =
"You have received an email requesting information from the generic homepage select box (Non Ohio Resident Box) from this email address: $email\n" .
"Customer Name: $name\n".
"IP: $ip\n".
"Browser: $browser";
mail($receiver, "Home Page Quote Request", $message);
mail($email,$subject2,$message4,'from:' .$from);
header( "location: /thankyou.php" );
exit;
}
}
?>