shontay Posted November 30, 2007 Share Posted November 30, 2007 The code below sits on a page named contact.php Essentially this contains standard contact details, AS WELL as being the form processor for a Contact form which sits on each page across the website, and the action on this form is action="contact.php?send=yes" which I hoped would then process the below. So then the page CAN be a normal content page, although at other times, when actioned contact.php?send=yes, it would then execute the code below, however this doesn't seem to work? And the server offers no error message to help me resolve this. Any help would be much appreciated - I am just learning PHP!! Thank you. <? &sendemail = $_GET["send"]; if (&sendemail == "yes") { $to = "tonyalawrence@hotmail.com, tonyalawrence@hotmail.co.uk"; $from = "webserver@serverhere.co.uk"; $subject = "Contact Form"; while( list($var,$val) = each($HTTP_POST_VARS) ) { $email .= "$var: $val\n"; } mail($to,$subject,$email,"From: $from"); echo "<p>Your contact form message has been successfully sent!</p>"; } ?> Link to comment Share on other sites More sharing options...
~n[EO]n~ Posted November 30, 2007 Share Posted November 30, 2007 LOL ... double post with different subject http://www.phpfreaks.com/forums/index.php/topic,169910.0.html Link to comment Share on other sites More sharing options...
MadTechie Posted November 30, 2007 Share Posted November 30, 2007 LOL, name noted down, weird when members play games like this to try to get help faster but it just makes us mad and less likely to help!! but then again i assume he didn't know he could bump or couldn't find his last post ~suggest closing this topic~ Link to comment Share on other sites More sharing options...
adam291086 Posted November 30, 2007 Share Posted November 30, 2007 You have to be careful though as some people, including me, have had error while posting. This causes a double post. Although this post isn't an accident as the title has changed. I do agree with MadTechie thoughts though. Link to comment Share on other sites More sharing options...
redbullmarky Posted November 30, 2007 Share Posted November 30, 2007 http://www.phpfreaks.com/forums/index.php/topic,169910.msg750419.html#msg750419 Link to comment Share on other sites More sharing options...
Recommended Posts