Page 1 of 1

Problems Posting Form

Posted: Tue Nov 11, 2003 3:59 am
by webgenius
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.

Posted: Tue Nov 11, 2003 4:02 am
by vigge89
have you configured your mail()-settings?

Posted: Tue Nov 11, 2003 4:14 am
by webgenius
How do I do that

Posted: Tue Nov 11, 2003 4:27 am
by twigletmac
Is this script running on your own PC or on a host's server? Is it running on Windows or Unix/Linux?

Mac

Posted: Tue Nov 11, 2003 5:35 am
by vigge89
from what i know, you/your host have to be able to handle mail()?

Posted: Wed Nov 12, 2003 9:43 am
by webgenius
the script is running on my host and it's a Unix server.