...

View Full Version : New coder need help from experienced members



adolph0034
08-26-2009, 05:00 PM
HI FRIENDS,

FIRST THANK YOU FOR TAKING THE TIME TO HELP ME.

I just uploaded my first site last night, http://www.bookyourkidsparty.com

However my form is not working.

my php code is as follows:


<?php

/* Subject and Email Variables */

$emailsubject = 'Contact Form';
$webMaster = 'adolph@bookyourkidzparty.com';

/* Gathering Data Variables */

$lastname = $_POST['name'];
$email = $_POST['email'];
$message = $_POST['message'];

$body = <<<EOT
Name: $lastname
Email: $email
Message: $message
EOT;

$headers = "From: $email\r\n";
$headers .= "Content=type: text/html\r\n";

/* Emailing the Form */

mail($webMaster, $emailsubject, $body, $headers);

/* Directing the User to the Webpage thanks.html */

header('Location: thanks.html');
?>


MY HTML CODE IS AS FOLLOWS


<div id="menu1">
<form id="two" action="form.php" method="post">
<fieldset id="personal">
<legend>HOST INFORMATION</legend>
<label for="lastname">Last Name: </label>
<input name="lastname" id="lastname" type="text" tabindex="1" />
<br />
<label for="firstname">First Name: </label>
<input name="firstname" id="firstname" type="text" tabindex="2" />
<br />
<label for="address">Address: </label>
<input name="address" id="address" type="text" tabindex="3" />
<br/>
<label for="address">City State Zip Code: </label>
<input name="address" id="address" type="text" tabindex="4" />
<br/>
<label for="email">E-mail: </label>
<input name="email" id="email" type="text"
tabindex="5" />
<br/>

<label for="event">Cell Number: </label>
<input name="number" id="number" type="text"
tabindex="6" />

<label for="event">Date of Event: </label>
<input name="event" id="event" type="text"
tabindex="7" />
<br/>

<label for="event">Time of Event: </label>
<input name="event" id="event" type="text"
tabindex="8" />
<br/>

<select name="choice">
<option selected="selected" label="Select Event Type" value="Select Event Type">
Select Event Type
</option>

<option label="Birthday Party" value="Birthday Party">Birthday Party
</option>
<option label="Block Party" value="Block Party">Block Party
</option>
<option label="Barmitfa" value="Barmitfa">Barmitfa
</option>
<option label="Corporate Event" value="Corporate Event">Corporate Event
</option>
<option label="Day Care Centers" value="Day Care Centers">Day Care Centers
</option>
<option label="Graduation Party" value="Graduation Party">Graduation Party
</option>
<option label="Private Event" value="Private Event">Private Event
</option>
<option label="Wedding Event" value="Wedding Event">Wedding Event
</option>
<option label="Other" value="Other">Other
</option>
</select>
<br >
<br />


<select name="choice">
<option selected="selected" label="Number of Children" value="Number of Children">
Number of Children
</option>

<option label="12 and Under" value="12 AND Under">12 and Under
</option>
<option label="13 - 25" value="13-25">13 - 25
</option>
<option label="25 - 50" value="25 - 50">25 - 50
</option>
<option label="50 Plus" value="50 Plus">50 Plus
</option>
</select>
</fieldset>


<fieldset id="medical">
<legend>PACKAGE OPTIONS</legend>
<br />
<b> Select One or More Varations (Multiple Quotes): </b>
<br >
<br />
<label for="smallpox">2 Clowns : </label>
<input name="illness" id="smallpox" type="checkbox"
value="smallpox" tabindex="20" />
<br />
<label for="mumps">1 Clown 1 Princess : </label>
<input name="illness" id="mumps" type="checkbox"
value="mumps" tabindex="21" />
<br />
<label for="dizziness">1 Character 1 Clown : </label>
<input name="illness" id="dizziness" type="checkbox"
value="dizziness" tabindex="22" />
<select name="choice">
<option selected="selected" label=" Select Character" value=" Select Character">
Select Character
</option>

<option label="Elmo" value="Elmo">Elmo
</option>
<option label="Spongebob" value="Spongebob">Spongebob
</option>
<option label="Dora" value="Dora">Dora
</option>
<option label="Blues Clue" value="Blues Clue">Blues Clue
</option>
<option label="Mickey Mouse" value="Mickey Mouse">Mickey Mouse
</option>
<option label="Minnie Mouse" value="Minnie Mouse">Minnie Mouse
</option>
<option label="Pirate" value="Pirate">Pirate
</option>
<option label="Spiderman" value="Spiderman">Spiderman
</option>
<option label="Batman" value="Batman">Batman
</option>
<option label="Power Ranger" value="Power Ranger">Power Ranger
</option>
<option label="Patrick" value="Patrick">Patrick
</option>
<option label="Mr.Krab" value="Mr.Krab">Mr.Krab
</option>
<option label="Pablo" value="Pablo">Pablo
</option>
<option label="Scooby Doo" value="Scooby Doo">Scooby Doo
</option>
<option label="Witch" value="Witch">Witch
</option>
<option label="Casper" value="Casper">Casper
</option>
<option label="Santa Clause" value="Santa Clause">Casper
</option>
<option label="Elf" value="Elf">Elf
</option>
<option label="Other" value="Other">Other
</option>
</select>
<br />

<label for="sneezing">1 Character 1 Princess : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<select name="choice">
<option selected="selected" label=" Select Character" value=" Select Character">
Select Character
</option>

<option label="Elmo" value="Elmo">Elmo
</option>
<option label="Spongebob" value="Spongebob">Spongebob
</option>
<option label="Dora" value="Dora">Dora
</option>
<option label="Blues Clue" value="Blues Clue">Blues Clue
</option>
<option label="Mickey Mouse" value="Mickey Mouse">Mickey Mouse
</option>
<option label="Minnie Mouse" value="Minnie Mouse">Minnie Mouse
</option>
<option label="Pirate" value="Pirate">Pirate
</option>
<option label="Spiderman" value="Spiderman">Spiderman
</option>
<option label="Batman" value="Batman">Batman
</option>
<option label="Power Ranger" value="Power Ranger">Power Ranger
</option>
<option label="Patrick" value="Patrick">Patrick
</option>
<option label="Mr.Krab" value="Mr.Krab">Mr.Krab
</option>
<option label="Pablo" value="Pablo">Pablo
</option>
<option label="Scooby Doo" value="Scooby Doo">Scooby Doo
</option>
<option label="Witch" value="Witch">Witch
</option>
<option label="Casper" value="Casper">Casper
</option>
<option label="Santa Clause" value="Santa Clause">Casper
</option>
<option label="Elf" value="Elf">Elf
</option>
<option label="Other" value="Other">Other
</option>

</select>
<br/>
<label for="sneezing">Little Diva/SPA Pacakge : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Splish Splash Package : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Other: </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<br />
<b> Select One: </b>
<br />
<label for="sneezing">1 Hour : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">90 Minutes : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">2 Hours : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Other : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<br >
<b> Select Multiple: </b>
<br >
</br>
<label for="sneezing"> Fantastic Face Painting </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Balloon Sculpting : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Magical Magic Show : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Bubble Show : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Puppet Show : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Game Package : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Lively Singing & Dancing : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Music DJ : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Delicious Cotton Candy : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Pop Corn : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Mega Bounce : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Large Pinatas : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>
<label for="sneezing">Goodie Bags : </label>
<input name="illness" id="sneezing" type="checkbox"
value="sneezing" tabindex="23" />
<br/>

</fieldset>


<fieldset id="current">
<legend>CURRENT MEDICATION</legend>
<p>...are you currently taking any medication?</p>
<p>...if currently taking medication,
please indicate it in the space below :</p>
<textarea name="current_medication" tabindex="40"
cols="40" rows="10">
</textarea>
</fieldset>
<p>
<input id="button1" type="submit" value="Send" />
<input id="button2" type="reset" />
</p>
</form>


</div>


NOTE: LAST NIGHT WHEN IT WORKED..I HIT THE SUBMITT BUTTON AND IT TOOK ME TO THANKS.HTML WHICH DOESNT EXIST..NOW WHEN I HIT SUBMITT IT TAKES ME TO FORM.PHP.......WHY THE CHANGE?

I ALSO HAVE A LOG OF ERRORS

PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 37
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 37
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14


THANKS FOR YOUR HELP

ADOLPH

Fumigator
08-26-2009, 05:10 PM
Fix those parse errors if you haven't already...


<form id="two" action="form.php" method="post">

You're telling the form to submit to form.php.

adolph0034
08-26-2009, 05:42 PM
Could you be more specific on what to fix..i am not sure what you mean by the parse errors?

adolph0034
08-26-2009, 06:30 PM
anyone???

Fumigator
08-26-2009, 06:42 PM
I ALSO HAVE A LOG OF ERRORS

PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected '}', expecting ']' in /hermes/web08/b155/moo.adolph0034/form.php on line 13
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 37
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 37
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected $end in /hermes/web08/b155/moo.adolph0034/form.php on line 30
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14
PHP Parse error: syntax error, unexpected T_SL in /hermes/web08/b155/moo.adolph0034/form.php on line 14

If these are still a problem you need to fix them. I didn't see the unexpected "}" in the code you posted though so you may have already fixed them.

Mido™
08-26-2009, 07:11 PM
$body = <<<EOT
Name: $lastname
Email: $email
Message: $message
EOT;


try to replace the EOT by " ",maybe the version of PHP or MySql of the server don't able to read it.

adolph0034
08-27-2009, 01:14 AM
header('Location: thanks.html');
?>

I changed thanks.html to my Home.htlml......and it still won't take me there

i am using fatcow.com...

it keeps taking me to form.php

adolph0034
08-27-2009, 02:12 AM
I also know that fatcow is using php 5 if that helps.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum