Pretty easy fix I think. The select input is just never reference in the php (and actually phonenumber is not either), so try replacing with this clip:
Code:
<?php
if ($_POST['emailSubmit']){
$body = "The following information was just submitted by a user: \n\n Full Name: " . $_POST['name'] . "\n Address: " . $_POST['address'] . "\n City: " . $_POST['city'] . "\n Phone Number: " . $_POST['phonenumber'] . "\n State: " . $_POST['state'] . "\n Age: " . $_POST['age'] . "\n Type of Class: " . $_PoST['typeofclass'] . "\n Comment: " . $_POST['comment'];
mail($_POST['emailTo'], "User requesting information on modeling classes", $body);
echo "Thank you for submitting your information we will get back to you shortly";
}else{ // Allow the HTML form to be displayed
?>
Then change the name of the select field from:
Code:
name="Type of Class"
to:
Just usually better not to use spaces in form names.
Also, to get the form to work completely correct the php section should be just above the form tag. So something like this:
Code:
<!DOCTYPE ...
...<body>
<?php
if ($_POST['emailSubmit']){
$body = "The following information was just submitted by a user: \n\n Full Name: " . $_POST['name'] . "\n Address: " . $_POST['address'] . "\n City: " . $_POST['city'] . "\n Phone Number: " . $_POST['phonenumber'] . "\n State: " . $_POST['state'] . "\n Age: " . $_POST['age'] . "\n Type of Class: " . $_PoST['typeofclass'] . "\n Comment: " . $_POST['comment'];
mail($_POST['emailTo'], "User requesting information on modeling classes", $body);
echo "Thank you for submitting your information we will get back to you shortly";
}else{ // Allow the HTML form to be displayed
?>
<form>...
...</form>
<?php } ?>
...<restofpage>