07-08-2006
|
#16 (permalink)
|
|
A$s On Fiyah
Join Date: May 2005
Location: Ewa Beach, Hawaii
Posts: 601
|
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 State: " . $_POST['state'] . "\n Age: " . $_POST['age'] . "\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
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Class Sign Up Form</title>
<style type="text/css">
body {
background-image: url("g8pat04.gif");
font: 12px/24px "Georgia", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
}
#title {
width: 330px;
height: 26px;
color: #000000;
font: bold 15px/18px "Georgia", "Trebuchet MS", Arial, Helvetica, sans-serif;
padding-top: 5px;
background: transparent url("g8pat04.gif") no-repeat;
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
}
form {
width: 335px;
}
.col1 {
text-align: right;
width: 135px;
height: 31px;
margin: 0;
float: left;
margin-right: 2px;
}
.col2 {
width: 195px;
height: 31px;
display: block;
float: left;
margin: 0;
}
.col2comment {
width: 195px;
height: 98px;
margin: 0;
display: block;
float: left;
}
.col1comment {
text-align: right;
width: 135px;
height: 98px;
float: left;
display: block;
margin-right: 2px;
}
div.row {
clear: both;
width: 335px;
}
.submit {
height: 29px;
width: 330px;
background: url(bg_submit.gif) no-repeat;
padding-top: 5px;
clear: both;
}
.input {
background-image: url("g8pat04.gif");
font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
margin: 4px 0 5px 8px;
padding: 1px;
border: 1px solid #000000;
}
.textarea {
border: 1px solid #000000;
background-image: url("g8pat04.gif");
font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
margin: 4px 0 5px 8px;
}
</style></head>
<body>
<form method="POST" action="<?php echo $_SERVER['PHPSELF']; ?>" >
<input type="hidden" name="emailTo" value="mst0ke@yahoo.com" />
<p> </p>
<div id="title">CLASS SIGN UP </div>
<div class="row">
<label class="col1">Full Name: </label>
<span class="col2"><input name="name" class="input" type="text" id="name" size="20" tabindex="1" /></span>
</div>
<div class="row">
<label class="col1">Address: </label>
<span class="col2">
<input name="address" class="input" type="text" id="address" size="25" tabindex="2" />
</span>
</div>
<div class="row"><label class="col1">City: </label>
<span class="col2"><input name="city" class="input" type="text" id="city" value="" size="2" tabindex="3" /></span>
</div>
<div class="row"><label class="col1">State: </label>
<span class="col2"><input name="state" class="input" type="text" id="state" value="" size="9" tabindex="4" /></span>
</div>
<div class="row"><label class="col1">Phone Number: </label>
<span class="col2"><input name="phonenumber" class="input" type="text" id="phonenumber" value="" size="9" tabindex="5" /></span>
</div>
<div class="row"><label class="col1">Age: </label>
<span class="col2"><input name="age" class="input" type="text" id="age" value="" size="3" tabindex="6" /></span>
</div>
<select name="Type Of Class">
<option>Beginning Modeling</option>
<option>Business Woman</option>
<option>Pageant</option>
<option>Personal Development & Grooming</option>
<option>Professional Modeling</option>
<option>Other</option>
</select>
<div class="row"></div>
<div class="row"><label class="col1comment">Comment: </label>
<span class="col2comment"><textarea cols="20" class="textarea" rows="4" name="comment" id="comment" tabindex="6" ></textarea></span>
</div>
<div align="center" class="submit">
<input type="submit" name="emailSubmit" value="Submit" />
</form>
</div>
<?php } ?>
</body>
</html>
everything else works except my drop down menu? i did insert list/menu. thanks if any one can help
__________________
google is my lover, whos yours?
|
|
|
07-08-2006
|
#17 (permalink)
|
|
Recursively call who?
Join Date: Nov 2003
Location: Pittsburgh, PA
Posts: 294
|
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>
|
|
|
07-09-2006
|
#18 (permalink)
|
|
A$s On Fiyah
Join Date: May 2005
Location: Ewa Beach, Hawaii
Posts: 601
|
woohoo thanks it works now! only thing that i cant seem to fix is the indentation for the menu. its not on the same line as its label and its not aligned with the rest of the form. i tried to get the code as close as it could to all the other fields but nothings working. heres the code once again
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<title>Class Sign Up Form</title>
<style type="text/css">
body {
background-image: url("g8pat04.gif");
font: 12px/24px "Georgia", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
}
#title {
width: 330px;
height: 26px;
color: #000000;
font: bold 15px/18px "Georgia", "Trebuchet MS", Arial, Helvetica, sans-serif;
padding-top: 5px;
background: transparent url("g8pat04.gif") no-repeat;
text-transform: uppercase;
letter-spacing: 3px;
text-align: center;
}
form {
width: 335px;
}
.col1 {
text-align: right;
width: 135px;
height: 31px;
margin: 0;
float: left;
margin-right: 2px;
}
.col2 {
width: 195px;
height: 31px;
display: block;
float: left;
margin: 0;
}
.col2comment {
width: 195px;
height: 98px;
margin: 0;
display: block;
float: left;
}
.col1comment {
text-align: right;
width: 135px;
height: 98px;
float: left;
display: block;
margin-right: 2px;
}
div.row {
clear: both;
width: 335px;
}
.submit {
height: 29px;
width: 330px;
background: url(bg_submit.gif) no-repeat;
padding-top: 5px;
clear: both;
}
.input {
background-image: url("g8pat04.gif");
font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
margin: 4px 0 5px 8px;
padding: 1px;
border: 1px solid #000000;
}
.textarea {
border: 1px solid #000000;
background-image: url("g8pat04.gif");
font: 11px/14px "Lucida Grande", "Trebuchet MS", Arial, Helvetica, sans-serif;
color: #000000;
margin: 4px 0 5px 8px;
}
</style></head>
<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 method="POST" action="<?php echo $_SERVER['PHPSELF']; ?>" >
<input type="hidden" name="emailTo" value="mst0ke@yahoo.com" />
<p> </p>
<div id="title">CLASS SIGN UP </div>
<div class="row">
<label class="col1">Full Name: </label>
<span class="col2"><input name="name" class="input" type="text" id="name" size="20" tabindex="1" /></span>
</div>
<div class="row">
<label class="col1">Address: </label>
<span class="col2">
<input name="address" class="input" type="text" id="address" size="25" tabindex="2" />
</span>
</div>
<div class="row"><label class="col1">City: </label>
<span class="col2"><input name="city" class="input" type="text" id="city" value="" size="2" tabindex="3" /></span>
</div>
<div class="row"><label class="col1">State: </label>
<span class="col2"><input name="state" class="input" type="text" id="state" value="" size="9" tabindex="4" /></span>
</div>
<div class="row"><label class="col1">Phone Number: </label>
<span class="col2"><input name="phonenumber" class="input" type="text" id="phonenumber" value="" size="9" tabindex="5" /></span>
</div>
<div class="row"><label class="col1">Age: </label>
<span class="col2"><input name="age" class="input" type="text" id="age" value="" size="3" tabindex="6" /></span>
</div><div class="row"><label class="col1">Type of Class: </label>
<span class="col2"></span>
<select name="typeofclass">
<option>Beginning Modeling</option>
<option>Business Woman</option>
<option>Pageant</option>
<option>Personal Development & Grooming</option>
<option>Professional Modeling</option>
<option>Other</option>
</select></div>
<div class="row"></div>
<div class="row"><label class="col1comment">Comment: </label>
<span class="col2comment"><textarea cols="20" class="textarea" rows="4" name="comment" id="comment" tabindex="6" ></textarea></span>
</div>
<div align="center" class="submit">
<input type="submit" name="emailSubmit" value="Submit" />
</form>
</div>
<?php } ?>
</body>
</html>
__________________
google is my lover, whos yours?
|
|
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT +1. The time now is 05:04 PM. Content Relevant URLs by vBSEO 3.2.0
|