Please chk if PHP scripts in my account are active....
I have been a loyal bizhatter for the past 5 years but now I want to update my old site to run PHP but it is simply not working... I would like form submission and email to work in PHP....
Pls advise
silverarch.bizhat.com
Code:<?php echo "Passing Variables"; $email = empty($_POST["email"]) ? "" : $_POST["email"]; $reserv_type = empty($_POST["reserv_type"]) ? "" : $_POST["reserv_type"]; $reserv_no = empty($_POST["reserv_no"]) ? "" : $_POST["reserv_no"]; $reserv_no_adults = empty($_POST["reserv_no_adults"]) ? "" : $_POST["reserv_no_adults"]; $reserv_no_children = empty($_POST["reserv_no_children"]) ? "" : $_POST["reserv_no_children"]; $date_in_input = empty($_POST["date_in_input"]) ? "" : $_POST["date_in_input"]; $date_out_input = empty($_POST["date_out_input"]) ? "" : $_POST["date_out_input"]; echo "Writing to file"; $file = "reserve.txt"; $a = fopen($file, "a"); fwrite($a,$email."\r\n"); fwrite($a,$reserv_type."\r\n"); fwrite($a,$reserv_no."\r\n"); fwrite($a,$reserv_no_adults."\r\n"); fwrite($a,$reserv_no_children."\r\n"); fwrite($a,$date_in_input."\r\n"); fwrite($a,$date_out_input."\r\n"); fwrite($a,"\r\n"); fwrite($a,"\r\n"); fclose($a); echo "Sending mail"; $to = "[email protected]"; $subject = "Reservation"; $message = "Email: ".$email."\r\n"."RoomType: ".$reserv_type."\r\n"."No. Of Rooms: ".$reserv_no."\r\n"."Adults: ".$reserv_no_adults."\r\n"."Children: ".$reserv_no_children."\r\n"."Check In: ".$date_in_input."\r\n"."Check Out: ".$date_out_input."\r\n\r\n"; // $headers = 'From: [email protected]'."\r\n".'Reply-To: [email protected]'."\r\n".'X-Mailer: PHP/'.phpversion(); mail($to,$subject,$message); echo "Mail Sent"; ?>




Reply With Quote
Bookmarks