DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   PHP (http://www.daniweb.com/forums/forum17.html)
-   -   FeedBack Form in php (http://www.daniweb.com/forums/thread118576.html)

nickyspace Apr 11th, 2008 6:51 am
FeedBack Form in php
 
Hi

I have issue regarding the mail, which is not sending to my mail account.



1. <html>
2. <body>
3. <?php
4. if (isset($_POST['email']))
5. //if "email" is filled out, send email
6. {
7. //send email
8. $email = $_POST['email'] ;
9. $subject = $_POST['subject'] ;
10. $message = $_POST['message'] ;
11. mail( "yourname@example.com", "Subject: $subject",
12. $message, "From: $email" );
13. echo "Thank you for using our mail form";
14. }
15. else
16. //if "email" is not filled out, display the form
17. {
18. echo "<form method='post' action='phpmail.php'>
19. Email: <input name='email' type='text' /><br />
20. Subject: <input name='subject' type='text' /><br />
21. Message:<br />
22. <textarea name='message' rows='15' cols='40'>
23. </textarea><br />
24. <input type='submit' />
25. </form>";
26. }
27. ?></body>
28. </html>

plz anybody can figure it out why my mail is not receiving in my mail account.

lydia21 Apr 11th, 2008 8:05 am
Re: FeedBack Form in php
 
$email = $_REQUEST['email'] ; 
 $subject = $_REQUEST['subject'] ;
$message = $_REQUEST['message'] ;
 mail( "yourname@example.com", $subject,$message, $email");
 echo "Thank you for using our mail form";

kkeith29 Apr 11th, 2008 8:58 am
Re: FeedBack Form in php
 
nevermind, my suggestion would work but I would have to rewrite you code. forget this post

nickyspace Apr 12th, 2008 2:51 am
Re: FeedBack Form in php
 
Thanxs for replying

i got solution and my issue is been resolved


All times are GMT -4. The time now is 6:51 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC