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 = "cluce@mydomain.com"; $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); ?> Quote Link to comment 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 Quote Link to comment 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 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.