http://www.adis.byethost24.com/d4l_test/contact.htmlזה הדף..לקחתי איזה סקריפט ושיניתי אותו קצת אבל אני חושב שמהתחלה יש לו איזה בעיה.
<?php $to = $_REQUEST ; $from = $_REQUEST ; $name = $_REQUEST ; $headers = "From: $from"; $subject = "Test"; $fields = array(); $fields{"Name"} = "Name"; $fields{"Email"} = "Email"; $fields{"Phone"} = "Phone"; $fields{"Message"} = "Message"; $body = "We have received the following information:\n\n"; foreach($fields as $a => $b){ $body .= sprintf("%20s: %s\n",$b,$_REQUEST); } $headers2 = "From: [email protected]"; $subject2 = "Thank you for contacting us."; $autoreply = "Thank you for contacting us. Somebody will get back to you as soon as possible, usually within 48 hours."; if($from == '') {print "You have not entered an email, please go back and try again";} else { if($name == '') {print "You have not entered a name, please go back and try again";} else { $send = mail($to, $subject, $body, $headers); $send2 = mail($from, $subject2, $autoreply, $headers2); if($send) {header( "package_tracking.html" );} else {print "We encountered an error sending your mail, please notify [email protected]"; } } } ?>
|