Hi all, let me start by saying, I am really new at all this. (like a week!) I had a form working fine with a PHP script that would check the form for a few key fields and then send it to me via email.
Then I tried adding a java calendar to the form to help fill out the 2 date fields. (there is some java in the body of the form.html and a seperate js file and a calendar.html)The java calendar seems to work, but now when I click submit on the form, it just flashes and resets itself instead of sending the form to me and presenting a message thanking the user for filling out the form. Something is conflicting with the java and php. Any help would be greatly appreciated.
For URL: www.zippyhotels.com/form.html
confirm.php
<html>
<body>
<BODY BGCOLOR="#FFFFFF">
<?php
if ((!$realname ) or (!$telephone) && (!$email)) {
echo "At a minimum, please enter a Contact Name and either a Telephone Number or an
Email address so that a ZippyHotels agent may contact you.
Thank You";
echo "<p>";
echo "Please use the 'Back' button on your browser to continue.";
echo "</p>";
exit;
}
$message="Name: $realname\n\n"."Government: $organization\n\n"."Destination: $destination\n\n"."Area: $area\n\n"."Number_Rooms: $numrooms\n\n"."Checkin: $checkin\n\n"."Checkout: $checkout\n\n"."Telephone: $telephone\n\n"."Nightphone: $nightphone\n\n"."Fax: $fax\n\n"."Email: $email\n\n"."Message: \n".$text;
mail("bookings@zippyhotels.com","Booking Request","$message","From:Form.$email\r\nReply-to:$email");
echo "<p>Thank you for completing your booking request. Your request has been forwarded to a ZippyHotels agent who will investigate pricing and room availability. You will be contacted shortly with the results. Once again, thank you for using ZippyHotels.com</p>";
echo "<p>From: $email</P>";
echo "<p>Subject: $subject</p>";
echo "<p>Message: </p>";
echo "<p>";
echo $text;
echo "</p><a href='/index.html'><b>Return to ZippyHotels</b></a>";
?>
</BODY>
</HTML>