howlingwolf Posted November 13, 2009 Share Posted November 13, 2009 Hi guys, I wonder if I can upload my contact form php code for you to take a look as I cant get it to work? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/ Share on other sites More sharing options...
pastcow Posted November 13, 2009 Share Posted November 13, 2009 Upload it and we can take a look Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957135 Share on other sites More sharing options...
Irresistable Posted November 13, 2009 Share Posted November 13, 2009 Upload it and post your error Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957140 Share on other sites More sharing options...
howlingwolf Posted November 13, 2009 Author Share Posted November 13, 2009 <?PHP $to = "info@marinapi.com.au"; $subject = "MarinaPi"; $e = $_POST['email_txt']; $message = "Name:" . $_POST['name_txt']; $message .= "\nE-mail: " . $e; $message .= "\nPhone: " . $_POST['phone_txt']; $message .= "\n\nMessage: " . $_POST['message_txt']; $headers = "From: $e"; $headers .= "\nReply-To: $e"; $sentOk = mail($to,$subject,$message,$headers); echo "sentOk=" . $sentOk; ?> I am getting "error sending message" Maybe I need to upload contact.fla as? Cheers guys Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957149 Share on other sites More sharing options...
mrMarcus Posted November 13, 2009 Share Posted November 13, 2009 that's all the error says, "error sending message"? need more details than that. Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957151 Share on other sites More sharing options...
howlingwolf Posted November 13, 2009 Author Share Posted November 13, 2009 Thats the message my contact.fla is comming back to me with. You can check on www.marinapi.com.au Thats why I asked if maybe copying the as code will help Thanks Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957153 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 Here is the attachment of the as coding : thanks guys [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957262 Share on other sites More sharing options...
garethhall Posted November 14, 2009 Share Posted November 14, 2009 I am not sure whats wrong on your end But I just tested your code and it works for me? Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957275 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 I am not sure whats wrong on your end But I just tested your code and it works for me? Well thats the thing - my webpage host is telling me that my form doesn't work bcs of my code error and I was suspecting that it can be bcs of their restrictions. Despite that i wanted someone else to test the code and confirm that. If there are more guys who can test it on their end and confirm that I will go back to the host and see what the real issue is. Thank you for testing it H Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957316 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 I am not sure whats wrong on your end But I just tested your code and it works for me? Can you test it from the webpage itself www.marinapi.com.au Cheers Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957318 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 Ahhh they also said something about it should be send as a mail and not to go through port 25 which they are blocking. Can that be an issue? Thx Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957320 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 anyone? Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957654 Share on other sites More sharing options...
mrMarcus Posted November 14, 2009 Share Posted November 14, 2009 an incorrect port would always be an issue. did they not suggest a port? try using port:26 can i see contact.php Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957656 Share on other sites More sharing options...
howlingwolf Posted November 14, 2009 Author Share Posted November 14, 2009 How can I configure it to go on port 26? Thank you <?PHP $to = "info@marinapi.com.au"; $subject = "MarinaPi"; $e = $_POST['email_txt']; $message = "Name:" . $_POST['name_txt']; $message .= "\nE-mail: " . $e; $message .= "\nPhone: " . $_POST['phone_txt']; $message .= "\n\nMessage: " . $_POST['message_txt']; $headers = "From: $e"; $headers .= "\nReply-To: $e"; $sentOk = mail($to,$subject,$message,$headers); echo "sentOk=" . $sentOk; ?> Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957661 Share on other sites More sharing options...
mrMarcus Posted November 14, 2009 Share Posted November 14, 2009 you should really ask your host what port they recommend you use. but you can use: ini_set ('smtp_port', '26'); place that at the top of you mail script. your host should really provide this stuff for you. if not, they're not much of a host, now are they. Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957665 Share on other sites More sharing options...
mrMarcus Posted November 15, 2009 Share Posted November 15, 2009 i don't get that last line you have either: echo "sentOk=" . $sentOk; you can't echo out the mail() function. thing is, you error handling isn't helping much. just a "error sending message" doesn't help. check your error logs on the server. Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957669 Share on other sites More sharing options...
howlingwolf Posted November 15, 2009 Author Share Posted November 15, 2009 you should really ask your host what port they recommend you use. but you can use: ini_set ('smtp_port', '26'); place that at the top of you mail script. your host should really provide this stuff for you. if not, they're not much of a host, now are they. First of all I want to thank you as my contact form works now, and no they are really bad and I spend somuch time with their customer support, I am really disapointed. Again thank you and thanks everyone who was in this from start. Cheers Quote Link to comment https://forums.phpfreaks.com/topic/181444-solved-contact-form-error/#findComment-957683 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.