Guys,
Just trying to get into PHP but I am struggling with the following:
When setting up a php mail form I can get all working. My problem is that I can't get the form to send both the fillers name and email and display it in the body of the received email.
In the HTML page I have
<form action="process.php" method="post">
Name: <input type="text" name="name" size="20" maxlength="20" /><br />
Email: <input type="text" name="email" size="30" maxlength="30" /><br />
<input type="hidden" name="sub" value="XXXXX" /><br />
<input type="submit" name="submit" value="Send" />
</form>
And in the php page I have
Code:
Thanks <?php
@extract($_POST);
$name = stripslashes($name);
$email = stripslashes($email);
mail('info@mydomain.com',$sub,$email,"From: $name <$email>");
echo $_POST["name"];
?>
, We will drop you a line shortly.
Any thoughts?