cluce Posted May 18, 2007 Share Posted May 18, 2007 I am baffled. Can someone tell me why the only output I receive in my email is the message: what ever submitted showed up. My name and email doesn't work??? here is my code........ <?php echo "<p>Thank you, <b>".$_POST["name"]."</b>, for your message!</p>"; echo "<p>Your email address is: <b>".$_POST["email"]."</b>.</p>"; //set up the mail $recipient = "[email protected]"; $subject = "Form Submission Results"; //start building the mail string $msg = "name: ".$_POST["name"]."\n"; $msg = "email: ".$_POST["email"]."\n"; $msg = "message: ".$_POST["message"]."\n"; //send mail mail ($recipient, $subject, $msg); ?> Link to comment https://forums.phpfreaks.com/topic/52036-solved-not-receiving-all-text-inputed-through-my-email/ Share on other sites More sharing options...
pikemsu28 Posted May 18, 2007 Share Posted May 18, 2007 whenever you are setting your variable $msg you need to concate it with ( .= ) what you have now is setting $msg to name, then over writing that with email, and finally setting $msg to the message $msg = "name: ".$_POST["name"]."\n"; $msg .= "email: ".$_POST["email"]."\n";//dont forget the period before the equal sign $msg .= "message: ".$_POST["message"]."\n";//dont forget the period before the equal sign EDIT: THIS SHOULD BE POSTED IN THE PHP FORUM, NOT THE MYSQL FORUM Link to comment https://forums.phpfreaks.com/topic/52036-solved-not-receiving-all-text-inputed-through-my-email/#findComment-256515 Share on other sites More sharing options...
cluce Posted May 18, 2007 Author Share Posted May 18, 2007 oops I thought I was in phph help. thanks Link to comment https://forums.phpfreaks.com/topic/52036-solved-not-receiving-all-text-inputed-through-my-email/#findComment-256520 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.