chiprivers Posted January 2, 2008 Share Posted January 2, 2008 I have tried to add a simple contact form on my site using the following script: <?php $mail_from = $_POST['email']; $name = $_POST['name']; $subject = $_POST['subject']; $message = $_POST['message']; $mail_to= "[email protected]"; $header = "from: $name <$mail_from>"; $send = mail($mail_to,$subject,$message,$header); ?> It is not working though?? Is there an error in this script? Is it likely that my hosting package may not allow this feature? Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/ Share on other sites More sharing options...
kenrbnsn Posted January 2, 2008 Share Posted January 2, 2008 What do you mean by "it is not working"? Do you any errors? Do you have a form that sends the information to this script? Ken Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428660 Share on other sites More sharing options...
chiprivers Posted January 2, 2008 Author Share Posted January 2, 2008 No errors, I'm just not recieving the test email! Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428729 Share on other sites More sharing options...
teng84 Posted January 2, 2008 Share Posted January 2, 2008 is this your email add [email protected] Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428732 Share on other sites More sharing options...
chiprivers Posted January 2, 2008 Author Share Posted January 2, 2008 is this your email add [email protected] No, I have just given an example of the bare bones of the script I am using to make sure I am doing it right! Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428748 Share on other sites More sharing options...
revraz Posted January 2, 2008 Share Posted January 2, 2008 Check your server log for errors. If error reporting isn't on in your php.ini, turn it on. Everything looks fine. Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428754 Share on other sites More sharing options...
teng84 Posted January 2, 2008 Share Posted January 2, 2008 does your mail server functioning properly .. and check if all your fields are filled out completely i dont know but sometime when one parameter is empty its not sending mail.. i suggest put an static value first and see if ti will work so the error will be easily determine Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428755 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.