Problems Posting Form
Posted: Tue Nov 11, 2003 3:59 am
I'm having problem with my contact form. I wrote this PHP script but it's not sending any message to my mail box when submitted. Can you help me out.
This is the code.
<meta http-equiv="refresh" content="10;URL=thanks.html">
<?
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$telephone=$_POST['telephone'];
$mailling=$_POST['mailling'];
$comments=$_POST['comments'];
$to="clickzone@lycos.co.uk";
$message="Message for ClickZone from $firstname $lastname. The message is:\n$comments\n\n The e-mail address is: $email, the Telephone number is: $telephone, the Mailling address is: $mailling";
if(mail($to,"Comments From Web Genius' Site",$message,"From: $email\n")) {
echo "Your message has been sent to CLICKZONE, thanks for writing. This page will automatically redirect";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
Thanks.
This is the code.
<meta http-equiv="refresh" content="10;URL=thanks.html">
<?
$firstname=$_POST['firstname'];
$lastname=$_POST['lastname'];
$email=$_POST['email'];
$telephone=$_POST['telephone'];
$mailling=$_POST['mailling'];
$comments=$_POST['comments'];
$to="clickzone@lycos.co.uk";
$message="Message for ClickZone from $firstname $lastname. The message is:\n$comments\n\n The e-mail address is: $email, the Telephone number is: $telephone, the Mailling address is: $mailling";
if(mail($to,"Comments From Web Genius' Site",$message,"From: $email\n")) {
echo "Your message has been sent to CLICKZONE, thanks for writing. This page will automatically redirect";
} else {
echo "There was a problem sending the mail. Please check that you filled in the form correctly.";
}
?>
Thanks.