contact form, PHP scripting

Hello all,
I am new to PHP coding. I am trying to create PHP scripting that makes my contact form functional. I would like the information from the contact for to be sent to my email address. I have watched a few tutorials and attempted to test the functionality using XAMPP.

Let me know if you see any errors you can help me out with. I receive error notices stating that some of the variables are not defined.

[HTML code]

Email Address:

A value is required.Invalid format.
 
Name:

A value is required.
 

Comment:

A value is required.
 
 
 
 
 
 
[/HTML code]

[php]

<?php /*Subject and email variables*/ $emailSubject = 'Comment from Measuring Sustainability Website'; $webMaster = '[email protected]'; /*Gathering Data Variables*/ $emailField = $_POST['email']; $nameField = $_POST['name']; $messageField = $_POST['message']; $body = <<<EOD


Email: $email
Name: $name
Message: $message
EOD; $headers = "From: $email\r\n"; $headers .= "Content-type: text/html\r\n"; $success = mail($webmaster, $emailSubject, $body, $headers); /*Results rendered in HTML*/ $theResults = <<<EOD Measuring Sustainability | US EPA

Jump to main content or area navigation.

US Environmental Protection Agency logo

  1. A-Z Index
  2. Advanced Search
  3. What are you looking for?

Contact Us

SHCRP: Indices and Indicators Project

 

The Seal of the United States Environmental Protection Agency

EOD; echo "$theResults"; ?>

[/php]

where is $email $name and $message defined?

Sponsor our Newsletter | Privacy Policy | Terms of Service