smokenwhispers Posted May 5, 2009 Share Posted May 5, 2009 I only get the form in the email but I do not have the results. Here is what they see... <form action="index-6contact.php" method="post" id="form1"><div style="margin:0 0 0 20px "> <table width="200"> <tr> <td align="right">Name:</td> <td align="left"><input name="name" type="text" size="34" maxlength="100"></td> </tr> <tr> <td align="right">Email:</td> <td align="left"><input name="email" type="text" size="34" maxlength="100"></td> </tr> <tr> <td align="right" valign="top">Message:</td> <td align="left"><textarea name="message" wrap="hard" cols="26" rows="20"></textarea></td> </tr> <tr> <td align="right"><input type="reset" name="clear" id="clear" value="Reset Form"></td> <td align="left"><input type="submit" name="submit" id="submit" value="Send Email"></td> </tr> </table></div> </form> Here is the PHP... <?php /* Subject and Email Variables */ $emailSubject = 'Customer Inquiry'; $webMaster = '[email protected]'; /* Gathering Data Variables */ $nameField = $_POST['name']; $emailField = $_POST['email']; $messageField = $_POST['message']; $body = <<<EOD <br><hr><br> Hello, my name is: $name <br> Please contact me at: $email <br> My issue is: $message <br> <br><hr><br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); Link to comment https://forums.phpfreaks.com/topic/156966-its-not-fair-im-not-getting-input-only-labels/ Share on other sites More sharing options...
Ken2k7 Posted May 5, 2009 Share Posted May 5, 2009 $body = <<<EOD <br><hr><br> Hello, my name is: $name <br> Please contact me at: $email <br> My issue is: $message <br> <br><hr><br> EOD; In that part of the code, your variable names are wrong. Link to comment https://forums.phpfreaks.com/topic/156966-its-not-fair-im-not-getting-input-only-labels/#findComment-826807 Share on other sites More sharing options...
radi8 Posted May 5, 2009 Share Posted May 5, 2009 It looks like the name, email, and body fields are mistypes. Try: <?php /* Subject and Email Variables */ $emailSubject = 'Customer Inquiry'; $webMaster = '[email protected]'; /* Gathering Data Variables */ $nameField = $_POST['name']; $emailField = $_POST['email']; $messageField = $_POST['message']; $body = <<<EOD <br><hr><br> Hello, my name is: $nameField <br> Please contact me at: $emailField <br> My issue is: $messageField <br> <br><hr><br> EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webMaster, $emailSubject, $body, $headers); ?> Link to comment https://forums.phpfreaks.com/topic/156966-its-not-fair-im-not-getting-input-only-labels/#findComment-826812 Share on other sites More sharing options...
smokenwhispers Posted May 5, 2009 Author Share Posted May 5, 2009 OOOO, thank you so much. Link to comment https://forums.phpfreaks.com/topic/156966-its-not-fair-im-not-getting-input-only-labels/#findComment-826853 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.