RyanSF07 Posted July 13, 2007 Share Posted July 13, 2007 Hi Guys, I'm using this bit of "send me an email" code in a different part of the site and it works great. So, I pasted it after this insert query (see below) so as to learn when a "new member" has registered, but when I test it, I'm not receiving mail -- even checked the Bulk folder. What do I need to change to make this work? $_POST[password] = md5($_POST[password]); if ($a AND $b AND $c) { //if required is true // do insert here $query = "INSERT INTO registered_users VALUES ('0', '$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]', '$_POST[email]', '$_POST[password]', '$_POST[link]', NOW())"; if (mysql_query($query)) { //send me an email $recep = "[email protected]"; $subject = "New Member"; $text = "'$_POST[first_name]', '$_POST[last_name]', '$_POST[user_name]', '$_POST[email]', '$_POST[link]',"; $headers = "X-Mailer: PHP\n" . "Reply-to: [email protected]\n"; mail($recep,$subject,$text,$headers); $content .= "<H2>Thank you, $_POST[user_name], for registering.</H2> <p>etc etc etc</p> <br>"; } Thank you for your help! Ryan Link to comment https://forums.phpfreaks.com/topic/59884-solved-php-send-mail-to-me/ Share on other sites More sharing options...
teng84 Posted July 13, 2007 Share Posted July 13, 2007 first change this if ($a AND $b AND $c) { to if ($a && $b && $c) { or if (isset($a) && isset($b) && isset($c)) { Link to comment https://forums.phpfreaks.com/topic/59884-solved-php-send-mail-to-me/#findComment-297784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.