JamesKoash Posted September 7, 2013 Share Posted September 7, 2013 (edited) I've built a survey which uses sessions to store user input. Rather than putting this into an SQL database, I've decided to use PHP to email the data as the information isn't private or confidential. Here is my code, following ($_SERVER['REQUEST_METHOD'] == 'POST'): $to = "xyz"; $subject = "Survey Response"; $message = "Test"; $from = "xyz"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); session_destroy(); header('Location: page_6.php'); exit; 'xyz' is obviously where a valid email address needs to go. However, even when I've tried it with a valid email address, nothing seems to be sending. Can someone tell me what I've done wrong? I also tried $message = print_r($_SESSION); but that didn't work either. Thanks Edited September 7, 2013 by JamesKoash Quote Link to comment Share on other sites More sharing options...
Solution JamesKoash Posted September 7, 2013 Author Solution Share Posted September 7, 2013 Actually don't worry... I think it's because I haven't configured my PHP.ini file in Wampserver for testing. 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.