View Single Post
Old 07-08-2006   #17 (permalink)
GoldNetX
Recursively call who?
 
GoldNetX's Avatar
 
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294

Send a message via AIM to GoldNetX
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:
Code:
name="typeofclass"
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>
__________________

www.gusmayo.com
- Maybe a story or two -


www.jaloobie.com
... your new home ...

www.webinkproductions.com
- professional web application design -
GoldNetX is offline