How to get HTML form content to my e-mail?
July 25th 2010
Hi, I’ve been working on a form for users to get an estimate on their project cost, so far I’ve been able to get the form to submit it’s content to a PHP site, and then e-mail me a message. The problem is that the message that I’m e-mailed doesn’t contain the info from the form, it’s just empty. How can I get my e-mail to contain the subject fields from the form?







July 27th, 2010 at 11:36 am
Simple. Here you go. Follow the method and you will be fijne.
July 29th, 2010 at 6:15 am
the information that is entered into the form is sent as “post” variables. You access these variables on the server side like this
$variable = $_POST["variable name from post"];
variable is the variable that will hold the information.
“variable name from post” is the form field ID
August 1st, 2010 at 4:41 pm
mail() needs the body of the message to be composed of the elements of the form:
$email = isset($_GET['email']) ? trim($_GET['email']) : ”;
$cabinet = isset($_GET['cabinet']) ? trim($_GET['cabinet']) : ”;
etc.
$body = ‘Email Address: ‘.$email.”\n\r”.’Cabinet Type: ‘.$cabinet…
Then send $body in mail()