HELP with PHP Code for form for email submition?

  • Thread starter Thread starter firegirlygirl
  • Start date Start date
F

firegirlygirl

Guest
Hi I have these code php for an html for but after I hit the submit button just goes to the php shows it like html doesnt really send me any code heres the code please help!

PHP

<html>
<head>
<title> Sending Email Form in listing </title>
</head>
<body>
<?php
echo "<p>Thank You, <b>" .$_POST["name"]."</b>, for your message!</p>";
echo "<p>you email address is: <b> .$_POST["email"]."</b></p>";
echo "<p>your message was:<br />";
echo $_POST["message"]."</p>";
//start building the mail string
$msg = "Name: ".$_POST["name"]."\n";
$msg = "E-mail: ".$_POST["email"]."\n";
$msg = "Message: ".$_POST["message"]."\n";
//set up the mail
$recipient = "[email protected]";
$subject = "Form Submition Results";
$mailheaders = "From: my site";
$mailheaders = "Reply - To: .$_POST["email"];
//send the mail mail
mail($recipient, $subject, $msg, $mailheaders);
?>
</body>
</html>

HTML

<html>
<head>
<title>
E-mail Form
</title>
</head>

<body>
<form action="sendmail.php" method= "POST">
<p>Name:</p>
<input type="text" size="25" name="name">
<p>Email Address</p>
<input type="text" size="25" name="email">
<p>Message:</p>
<textarea name="message" cols="30" rows="5"></textarea>
<p><input type="submit" value="send" /></p>
</form>
</body>



</html>
 
Back
Top