DRYICENZ Posted March 8, 2010 Share Posted March 8, 2010 Hi all, I'm hoping someone can check my php coding and tell me why client information on my contact page... http://www.dryiceproductions.com/contact.html Such as "Name:" "Email:" & "Comments:" ... is not being forward to my email? I know my email address is correct as I receive a message which says: Name: Email: " . . " Comments: " . . " Only the fields are blank despite filling them in while testing? Please view the php coding below: <?php /* Email Variables */ $emailSubject = 'contactformprocess!'; $webMaster = 'info@dryiceproductions.com'; /* Data Variables */ $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; $body = <<<EOD Name: $name Email: " . $email . " Comments: " . $comments . " EOD; $headers = "From: " . $email . "\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); /* Results rendered as HTML */ $theResults = <<<EOD <html> <head> <title>sent message</title> <meta http-equiv="refresh" content="3;URL=http://www.dryiceproductions.com/contact.html"> <style type="text/css"> <!-- body { background-color: #444; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 20px; font-style: normal; line-height: normal; font-weight: normal; color: #90C1E5; text-decoration: none; padding-top: 200px; margin-left: 150px; width: 800px; } --> </style> </head> <body> <p>Your email has been sent!</p> <p>You will return to Dry Ice Productions Ltd in a few seconds!</p> </body> </html> EOD; echo $theResults; Any help you can give would be greatly appreciated! Many thanks. Geoff Quote Link to comment Share on other sites More sharing options...
Deoctor Posted March 8, 2010 Share Posted March 8, 2010 just now i have checked ur url these are the parameters that are being posted when i submit the form Submit Submit textarea 324sdasdasd textfield rqeqwe textfield2 3121321 there is no fileds of name which u have given $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; change these in the form which u are submitting.. Quote Link to comment Share on other sites More sharing options...
DRYICENZ Posted March 8, 2010 Author Share Posted March 8, 2010 Hi ym_chaitu Thanks for helping out! Apologize as I am a complete php novice but what should I change the fields of name to? Do you have an example? Many thanks! Quote Link to comment Share on other sites More sharing options...
DRYICENZ Posted March 8, 2010 Author Share Posted March 8, 2010 Any thoughts how to change the 'fields of name' for the coding below? $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; Quote Link to comment Share on other sites More sharing options...
Deoctor Posted March 8, 2010 Share Posted March 8, 2010 change this $email = $_POST['email']; $name = $_POST['name']; $comments = $_POST['comments']; to like this $email = $_POST['textarea']; $name = $_POST['textfield']; $comments = $_POST['textfield2']; or else change the name fields in the form of contact.html page. Quote Link to comment Share on other sites More sharing options...
DRYICENZ Posted March 8, 2010 Author Share Posted March 8, 2010 You are a legend! The site now works and I can receive emails:) Thanks very much for your time! 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.