chewydence Posted August 24, 2009 Share Posted August 24, 2009 Hi Guys, I'm learning php, I checked out some of the websites that shows on creating a contact form/feedback form. I set up my apache server and my mysql( but i dun think it will matter in this case since it's only sending email) I created a feedback.html, sendmail.php below and thankyou.html. I replaced the mail to my own email and I tried to run it at e localhost, it can redirect to the thankyou.html but I didn't receive any email. sendmail.php <?php $email = $_REQUEST['email'] ; $message = $_REQUEST['message'] ; mail( "[email protected]", "Feedback Form Results", $message, "From: $email" ); header( "Location: http://localhost/thankyou.html" ); ?> feedback.html <html> <body> <form method="post" action="sendmail.php"> Email: <input name="email" type="text" /><br /> Message:<br /> <textarea name="message" rows="15" cols="40"> </textarea><br /> <input type="submit" /> </form> </body> </html> Which part do I need to correct on in order to get it working? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/171681-send-email-function/ Share on other sites More sharing options...
p2grace Posted August 24, 2009 Share Posted August 24, 2009 Do you have sendmail setup? You need an email server for php to send the email. Link to comment https://forums.phpfreaks.com/topic/171681-send-email-function/#findComment-905286 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.