I built a Feedback Form for one of my sites. I used the <form> dkdkdk </form> coding in the webpage using HTML. I used the action:
action="http://www.mywebsite.com/sendmail.php">
The items in the form are: name, address, prof (radio buttons), citystzip, email and message.
I set up the sendmail.php file as follows:
<?php
$name = $_POST['name'];
$address = $_POST['address'];
$citystzip = $_POST['citystzip'];
$email = $_POST['email'];
$prof = $_POST['prof'];
$message = $_POST['message'];
$formcontent="From: $name \n Address: $address \n City, St Zip: $citystzip \n Treated with courtesy: $prof \n Message: $message";$recipient = "rockwell.c@att.net";
$subject = "Contact Form";
$mailheader = "From: $email ";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header( "Location: contact-confirm.htm" );
?>
Looking at the $formcontent, I would expect to see the message going to the recipient (me while I'm testing) to look like below, EXCEPT, I would expect the name ($name) to show up with From: line and the address ($address) to be on the Address line.
However, I am receiving the message as follows
From: 123 street
Address:
City, St Zip: Anywhere, CA 95000
Treated with courtesy: Praise
Message: I'm a ...........
Can you help me?