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.
form to email php code help
Moderator: General Moderators
-
klevis miho
- Forum Contributor
- Posts: 413
- Joined: Wed Oct 29, 2008 2:59 pm
- Location: Albania
- Contact:
Re: form to email php code help
Are you really sure that the name="name" in the input tag?