mytutorisfat Posted September 16, 2007 Share Posted September 16, 2007 Hi guys, I have a simple 3 input html form and I found a tutorial that I understand that in theory should send the data from the form to the email address supplied. It doesnt seem to do anything thought if anyone could point me in the direction of either a better tutorial, a thread where this kind of thing is discussed (I had no luck when I searched) or even spot any problems in the code your help would be appreciated. <?php $name = $_REQUEST['name'] ; $email = $_REQUEST['email'] ; $comments = $_REQUEST['comments'] ; mail( "insert email here", "Query Form Results", $comments, "From: $name", "Email: $email" ); header( "Location: insert url here" ); ?> Thanks in advance Mytutorisfat Quote Link to comment Share on other sites More sharing options...
Jessica Posted September 16, 2007 Share Posted September 16, 2007 Maybe because it just says insert email here instead of an email Quote Link to comment Share on other sites More sharing options...
mytutorisfat Posted September 16, 2007 Author Share Posted September 16, 2007 argh sorry I should of said I've taken out the actual email and url, I do apologise. Thanks for the speedy response though Quote Link to comment Share on other sites More sharing options...
TNGuy03 Posted September 16, 2007 Share Posted September 16, 2007 Try this (replace red text with whatever is appropriate for your site): <?php $name = $_REQUEST['name']; $email = $_REQUEST['email']; $comments = stripslashes($_REQUEST['comments']); $webmaster = 'you @ email.com'; $subject = 'Your Email Subject'; mail($webmaster, $subject, $comments, "From: $name <$email>"); header("Location: success.php"); ?> Quote Link to comment Share on other sites More sharing options...
mytutorisfat Posted September 16, 2007 Author Share Posted September 16, 2007 Thanks really appreciate it, it's much friendlier here than on other php forums Quote Link to comment Share on other sites More sharing options...
rarebit Posted September 16, 2007 Share Posted September 16, 2007 http://lampgeekz.netgeekz.net/forum/index.php/topic,38.0.html Quote Link to comment Share on other sites More sharing options...
mytutorisfat Posted September 16, 2007 Author Share Posted September 16, 2007 legend cheers Quote Link to comment 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.