Have a form that works with FF, Chrome but not working with any version of IE.
the contact.php script is as follows:
Any thoughts would be appreciated
the contact.php script is as follows:
Code:
<?php
/* Set e-mail recipient */
$myemail = "rentals@example.com";
/* Check all form inputs using check_input function */
$group = check_input($_POST['group']);
$yourname = check_input($_POST['yourname']);
$address = check_input($_POST['address']);
$city = check_input($_POST['city']);
$state = check_input($_POST['state']);
$zip = check_input($_POST['zip']);
$phone = check_input($_POST['phone']);
$email = check_input($_POST['email'], "Enter your email address");
$arrival_date = check_input($_POST['arrival_date']);
$departure_date = check_input($_POST['departure_date']);
$local_lodging = check_input($_POST['local_lodging']);
$num_days = check_input($_POST['num_days']);
$name1 = check_input($_POST['name1']);
$age1 = check_input($_POST['age1']);
$height1 = check_input($_POST['height1']);
$weight1 = check_input($_POST['weight1']);
$sport_equip1 = check_input($_POST['1sport_equi1p']);
$sport_ski_size1 = check_input($_POST['sport_ski_size1']);
$demo_equip1 = check_input($_POST['demo_equip1']);
$demo_ski_model1 = check_input($_POST['demo_ski_model1']);
$demo_ski_size1 = check_input($_POST['demo_ski_size1']);
$shoe_size1 = check_input($_POST['shoe_size1']);
$board_equip1 = check_input($_POST['board_equip1']);
$board_size1 = check_input($_POST['board_size1']);
$jr_equip1 = check_input($_POST['jr_equip1']);
$jr_ski_size1 = check_input($_POST['jr_ski_size1']);
$skier_type1 = check_input($_POST['skier_type1']);
$comment1 = check_input($_POST['comment1']);
$name2 = check_input($_POST['name2']);
$age2 = check_input($_POST['age2']);
$height2 = check_input($_POST['height2']);
$weight2 = check_input($_POST['weight2']);
$sport_equip2 = check_input($_POST['sport_equip2']);
$sport_ski_size2 = check_input($_POST['sport_ski_size2']);
$demo_equip2 = check_input($_POST['demo_equip2']);
$demo_ski_model2 = check_input($_POST['demo_ski_model2']);
$demo_ski_size2 = check_input($_POST['demo_ski_size2']);
$shoe_size2 = check_input($_POST['shoe_size2']);
$board_equip2 = check_input($_POST['board_equip2']);
$board_size2 = check_input($_POST['board_size2']);
$jr_equip2 = check_input($_POST['jr_equip2']);
$jr_ski_size2 = check_input($_POST['jr_ski_size2']);
$skier_type2 = check_input($_POST['skier_type2']);
$comment2 = check_input($_POST['comment2']);
$name3 = check_input($_POST['name3']);
$age3 = check_input($_POST['age3']);
$height3 = check_input($_POST['height3']);
$weight3 = check_input($_POST['weight3']);
$sport_equip3 = check_input($_POST['sport_equip3']);
$sport_ski_size3 = check_input($_POST['sport_ski_size3']);
$demo_equip3 = check_input($_POST['demo_equip3']);
$demo_ski_model3 = check_input($_POST['demo_ski_model3']);
$demo_ski_size3 = check_input($_POST['demo_ski_size3']);
$shoe_size3 = check_input($_POST['shoe_size3']);
$board_equip3 = check_input($_POST['board_equip3']);
$board_size3 = check_input($_POST['board_size3']);
$jr_equip3 = check_input($_POST['jr_equip3']);
$jr_ski_size3 = check_input($_POST['jr_ski_size3']);
$skier_type3 = check_input($_POST['skier_type3']);
$comment3 = check_input($_POST['comment3']);
$name4 = check_input($_POST['name4']);
$age4 = check_input($_POST['age4']);
$height4 = check_input($_POST['height4']);
$weight4 = check_input($_POST['weight4']);
$sport_equip4 = check_input($_POST['sport_equip4']);
$sport_ski_size4 = check_input($_POST['sport_ski_size4']);
$demo_equip4 = check_input($_POST['demo_equip4']);
$demo_ski_model4 = check_input($_POST['demo_ski_model4']);
$demo_ski_size4 = check_input($_POST['demo_ski_size4']);
$shoe_size4 = check_input($_POST['shoe_size4']);
$board_equip4 = check_input($_POST['board_equip4']);
$board_size4 = check_input($_POST['board_size4']);
$jr_equip4 = check_input($_POST['jr_equip4']);
$jr_ski_size4 = check_input($_POST['jr_ski_size4']);
$skier_type4 = check_input($_POST['skier_type4']);
$comment4 = check_input($_POST['comment4']);
/* If e-mail is not valid show error message */
if (!preg_match("/([\w\-]+\@[\w\-]+\.[\w\-]+)/", $email))
{
show_error("E-mail address not valid");
}
/* Let's prepare the message for the e-mail */
$message = "What is up your rentalness!
Everybody wants some, this person wants some too:
_______________________________________
Group Name: $group
Name: $yourname
Contact Address: $address
City: $city
State: $state
Zip Code: $zip
Daytime Phone: $phone
Contact E-mail: $email
Arrival Date: $arrival_date
Departure Date: $departure_date
Local Accomodations: $local_lodging
Number of days skiing: $num_days
__________________________________________
RENTER #1
Name: $name1
Birth Date: $age1
Height (ft/in): $height1
Weight (lbs): $weight1
SPORT EQUIPMENT
Package Type: $sport_equip1
Sport Ski Size: $sport_ski_size1
Shoe size: $shoe_size1
DEMO SKIS
Package Type: $demo_equip1
Demo ski model: $demo_ski_model1
Demo Ski size: $demo_ski_size1
Shoe size: $shoe_size1
SNOWBOARD
Package Type: $board_equip1
Board size: $board_size1
Shoe size: $shoe_size1
KID'S EQUIPMENT (12 and under)
Junior Pakage: $jr_equip1
Ski Length: $jr_ski_size1
Shoe size: $shoe_size1
Skier Type: $skier_type1
Comments: $comment1
___________________________________
RENTER #2
Name: $name2
Birth Date: $age2
Height (ft/in): $height2
Weight (lbs): $weight2
SPORT EQUIPMENT
Package Type: $sport_equip2
Sport Ski Size: $sport_ski_size2
Shoe size: $shoe_size2
DEMO SKIS
Package Type: $demo_equip2
Demo ski model: $demo_ski_model2
Demo Ski size: $demo_ski_size2
Shoe size: $shoe_size2
SNOWBOARD
Package Type: $board_equip2
Board size: $board_size2
Shoe size: $shoe_size2
KID'S EQUIPMENT (1 and under)
Junior Pakage: $jr_equip2
Ski Length: $jr_ski_size2
Shoe size: $shoe_size2
Skier Type: $skier_type2
Comments: $comment2
________________________________________
RENTER #3
Name: $name3
Birth Date: $age3
Height (ft/in): $height3
Weight (lbs): $weight3
SPORT EQUIPMENT
Package Type: $sport_equip3
Sport Ski Size: $sport_ski_size3
Shoe size: $shoe_size3
DEMO SKIS
Package Type: $demo_equip3
Demo ski model: $demo_ski_model3
Demo Ski size: $demo_ski_size3
Shoe size: $shoe_size3
SNOWBOARD
Package Type: $board_equip3
Board size: $board_size3
Shoe size: $shoe_size3
KID'S EQUIPMENT (12 and under)
Junior Pakage: $jr_equip3
Ski Length: $jr_ski_size3
Shoe size: $shoe_size3
Skier Type: $skier_type3
Comments: $comment3
_____________________________
RENTER #4
Name: $name4
Birth Date: $age4
Height (ft/in): $height4
Weight (lbs): $weight4
SPORT EQUIPMENT
Package Type: $sport_equip4
Sport Ski Size: $sport_ski_size4
Shoe size: $shoe_size4
DEMO SKIS
Package Type: $demo_equip4
Demo ski model: $demo_ski_model4
Demo Ski size: $demo_ski_size4
Shoe size: $shoe_size4
SNOWBOARD
Package Type: $board_equip4
Board size: $board_size4
Shoe size: $shoe_size4
KID'S EQUIPMENT (12 and under)
Junior Pakage: $jr_equip4
Ski Length: $jr_ski_size4
Shoe size: $shoe_size4
Skier Type: $skier_type4
Comments: $comment4
End of message
";
$subject = "Rental Reservation";
/* Send the message using mail() function */
mail($myemail, $subject, $message);
/* Redirect visitor to the thank you page */
header('Location: http://www.tetonvillagesports.com/thanks.html');
exit();
/* Functions we used */
function check_input($data, $problem='')
{
$data = trim($data);
$data = stripslashes($data);
$data = htmlspecialchars($data);
if ($problem && strlen($data) == 0)
{
show_error($problem);
}
return $data;
}
function show_error($myError)
{
?>
<html>
<body>
<b>Please correct the following error:</b><br />
<?php echo $myError; ?>
</body>
</html>
<?php
exit();
}
?>
Any thoughts would be appreciated
Comment