Seemingly simple issue: I have an HTML form:
<form action="submit.php" method="post" enctype="text/plain">
<h3>Owner Information</h3>
First Name*: <br />
<input type="text" name="firstname" /><br />
Last Name*: <br />
<input type="text" name="lastname" /><br /><br />
Are you the owner on title?*: <br />
<input type="radio" name="titleowner" value="yes" />Yes
<input type="radio" name="titleowner" value="no" />No<br /><br />
</form>
And then here is submit.php:
<?php
$admin_email = "aloha@hi.com";
$email = "hey@gmail.com";
$subject = "subject";
$message = htmlspecialchars($_POST['firstname'] . " " . $_POST['lastname']);
$message .= "Title Owner? " . htmlspecialchars($_POST["titleowner"]);
$message .= "Mailing Address: " . htmlspecialchars($_POST['mailingaddress']) . "City: " . htmlspecialchars($_POST['city']) . "State:" . htmlspecialchars($_POST['state']) . "Zip Code" . (int)$_POST['zipcode'] . "Phone Number:" . strip_tags($_POST['phoneNum']);
//send email
mail($admin_email, $subject, $message);
echo $message;
//Email response
echo "Thank you for contacting us!";
?>
The 'echo message' produces this when the user submits:
Title Owner? Mailing Address: City: State:Zip Code0Phone Number:Thank you for contacting us!
As you can see, the variable for some reason did not populate. Any help is very much appreciated. Thank you.