Page 1 of 1

form to email php code help

Posted: Thu Oct 28, 2010 8:58 am
by camaross
I am trying to create a php code to send info from my html form to an email address, so below is my code:

$name = $_POST['name'];
$body = "This is an email from: $name";

$success = mail($webMaster, $emailSubject, $body, $headers);

I can receive the email, but all I got in the email body is "This is an email from:". I can not get anything related to what I input as $name. I am pretty sure the value name in my html is 'name'.

Anyone could help?

Thank you.

Re: form to email php code help

Posted: Fri Oct 29, 2010 6:19 am
by klevis miho
Are you really sure that the name="name" in the input tag?