PDA

View Full Version : Form using Spry and PHP on GoDaddy - results come back blank


Habfan
11-02-2008, 07:50 PM
Hi,
Newbie here! I have a problem with my form on my new site. Hosted on godaddy, the results come back to my email with the filled out parts blank. Here is the code for my form (it uses Spry for validation) and PHP code:
--------
Form:
--------
<form id="form1" name="form1" method="post" action="mailmeOrder.php">
<p>

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield1"> First Name:&nbsp;&nbsp;&nbsp;
<input name="FirstName" type="text" class="textFields" id="FirstName" size="15"/>
<!--Display an error message-->
<span class="textfieldRequiredMsg">Your first name is required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield2"> Last Name:&nbsp;&nbsp;&nbsp;
<input name="LastName" type="text" class="textFields" id="LastName" size="15"/>
<!--Display an error message-->
<span class="textfieldRequiredMsg">Your last name is required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield3"> Email Address:&nbsp;&nbsp;&nbsp;
<input name="email" type="text" class="textFields" id="email" size="15"/>
<!--Display an error message-->
<span class="textfieldRequiredMsg">An email is required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield4"> Phone #:&nbsp;&nbsp;&nbsp;
<input name="phone_number" type="text" class="textFields" id="phone_number" size="15"/><!--Display an error message-->
<span class="textfieldRequiredMsg">Please enter your phone #.</span></span><br />
[Format req'd: (000) 000-0000]<br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield5"> Verse(s):&nbsp;&nbsp;&nbsp;
<input name="Verse" type="text" class="textFields" id="Verse" size="15"/>
<!--Display an error message-->
<span class="textfieldRequiredMsg">Verse(s) is/are required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield6"> Font Choice:&nbsp;&nbsp;&nbsp;
<input name="FontChoice" type="text" class="textFields" id="FontChoice" size="15"/><!--Display an error message-->
<span class="textfieldRequiredMsg">Font Choice is required.</span></span><br />
If you are using a non-IE browser where the hover doesn't work (Firefox), please fill in the column # and row # of the color. <br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield7"> Base Color:&nbsp;&nbsp;&nbsp;
<input name="BaseColor" type="text" class="textFields" id="BaseColor" size="15" />
<!--Display an error message-->
<span class="textfieldRequiredMsg">Base Color is required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield8"> Background Color:&nbsp;&nbsp;&nbsp;
<input name="BackgroundColor" type="text" class="textFields" id="BackgroundColor" size="15" />
<!--Display an error message-->
<span class="textfieldRequiredMsg">Background Color is required.</span></span><br />

<!-- Create the text field widget and assign a unique id-->
<span id="sprytextfield9"> Font Color:&nbsp;&nbsp;&nbsp;
<input name="FontColor" type="text" class="textFields" id="FontColor" size="15" />
<!--Display an error message-->
<span class="textfieldRequiredMsg">Font Color is required.</span></span></p>

<div align="center">
<input name="Submit" type="submit" class="textFields" value="Submit" />
<input name="Reset" type="reset" class="textFields" value="Reset" />
</div>
</form>

<!-- Initialize the Validation Text Field widget objects-->
<script type="text/javascript">
var tf1 = new Spry.Widget.ValidationTextField("sprytextfield1", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf2 = new Spry.Widget.ValidationTextField("sprytextfield2", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf3 = new Spry.Widget.ValidationTextField("sprytextfield3", "email", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf4 = new Spry.Widget.ValidationTextField("sprytextfield4", "phone_number", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf5 = new Spry.Widget.ValidationTextField("sprytextfield5", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf6 = new Spry.Widget.ValidationTextField("sprytextfield6", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf7 = new Spry.Widget.ValidationTextField("sprytextfield7", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf8 = new Spry.Widget.ValidationTextField("sprytextfield8", "none", {validateOn:"blur"});
</script>
<script type="text/javascript">
var tf9 = new Spry.Widget.ValidationTextField("sprytextfield9", "none", {validateOn:"blur"});
</script>


-------------
PHP:
-------------

<?php
$headers = "MIME-Version: 1.0\n" ;
$headers .= "From: $EmailAddress\n";

mail("info@greatestdomainever.com","His Signs Website Visitor Comment", "

First Name: $FirstName
Last Name: $LastName
Email: $email
Phone Number: $phone_number
Verse: $Verse
Font Choice: $FontChoice
Base Color: $BaseColor
Background Color: $BackgroundColor
Font Color: $FontColor

", "$headers");

{
header("Location: http://www.greatestdomainever.com/index.html");
exit;
}
?>

That's it. Like I said, I get the form results back in my email, but it's missing the filled out textfields that users (I) enter and then submit. I have a feeling that my php form is way wrong. Can someone please help me figure this out?
Thanks!

davidj
11-03-2008, 12:30 AM
how are you catching the form values

you need to use $_POST / $_GET (form method dependant)

Habfan
11-03-2008, 10:39 PM
how are you catching the form values

you need to use $_POST / $_GET (form method dependant)

Sorry as a newbie I can't understand what you are saying ("use $_POST / $_GET)... Could you give me an example or point me to where one is? I just don't know what to do with that information. Thanks

edbr
11-04-2008, 01:33 AM
POST and GET are ways of carrying information from on page to another. check DW help it will explain it better