By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,704 Members | 1,122 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,704 IT Pros & Developers. It's quick & easy.

Need Help Figuring out why my customer form will not send email.

P: 10
This form will not send the email to my account and I used other forms to submit emails using examples that I googled but I can't get this form to process the request. Can someone tell me what i'm missing?



my PHP Form:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <HEAD>
  3. <TITLE>Demetrius's Customer Form</TITLE>
  4.  
  5. </HEAD>
  6. <BODY BGCOLOR="#F6B28F">
  7. <HR>
  8. <H1><FONT FACE="Arial"><FONT COLOR="004E4A">Demetrius's Customer Form</FONT></H1>
  9. <HR>
  10.  
  11. <p>In order to serve you, please tell us your problem:</p>
  12.     <form method="post" action="mycustomeremail.php">
  13.  
  14. <H3>THanks for visiting my customer service site I am so glad that i can serve you. </H3>
  15.  
  16. <BR>Report your issue
  17.  
  18. <fieldset>
  19.     <legend>Send Email</legend>
  20.  
  21. <p>Email: <input type="text" name="email" size="60"></p>
  22.  
  23. <p><label for="subject">Subject:</label><input type="text" id="subject"></p>
  24.  
  25. <p><label for="message">Message:</label><br/>
  26.  
  27. <TEXTAREA  id="message" name="message" rows="10" cols="70" WRAP="hard">
  28. </TEXTAREA>
  29.  
  30.  <p><input type=submit value="Submit"> <input type=reset value="Reset"></p>
  31.  
  32. </FORM>
  33. </BODY>
  34. </HTML>
PHP Script:

Expand|Select|Wrap|Line Numbers
  1. <html>
  2. <head>
  3.   <title>My Customer Email</title>
  4. </head>
  5.   <body>
  6.  
  7.   <?php
  8.   $msg = "Thank you for allowing us to server you.";
  9. $today = date("02/16/2011");
  10. $msg = $msg . "<br/>" . $today;
  11. $name = $_POST["name"];
  12. $email = $_POST["email"];
  13. echo $name . " (" . $email . ")<br /> " . $msg;
  14.  
  15. echo $msg;     //display message
  16.   ?>
  17.  
  18.   </body>
  19. </html>
Feb 17 '11 #1
Share this Question
Share on Google+
4 Replies


Dormilich
Expert Mod 5K+
P: 8,639
you donít have any PHP code (posted) that is sending an email.
Feb 18 '11 #2

clain
P: 79
you should use a PHP mail() or sendmail function to send mail. Both are not present in this this code.
Feb 19 '11 #3

P: 27
mail($_POST['email'],"Subject text Here",$msg);

done..
Feb 19 '11 #4

P: 27
lol you dont need the [' but ok :)
Feb 19 '11 #5

Post your reply

Sign in to post your reply or Sign up for a free account.