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= "name@domain.com"; $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? Quote 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 Quote 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! Quote 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 name@domain.com Quote 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 name@domain.com 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! Quote 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. Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/84190-php-contact-form/#findComment-428755 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.