Click to See Complete Forum and Search --> : Parse problems ...


Anon
06-28-2002, 03:53 PM
Can someone look over this and tell me what
I have wrong. After an hour I give I havent figured it out!

<?php

if (($Name == "") || ($Age == "") || ($Email == ") || ($Address == "") || ($City == "") || ($State == "") || ($Zip == "") || ($Comments == ""))
{
echo "<form name=form method=post action=contact_thanks.php>";
echo "<p class=bodymd>All fields of this form are required, I really don't think that's too much to ask...</p>";
echo "<p class=bodymd>Fill in the ones you missed, they are listed below.</p>";
}

if ($Name == "")
{
echo "<p class=bodymd>Your Name<br><input type=text name=Name></p>";
}
else
{
echo "<input type=hidden name=Name value=$Name>";
}

if ($Age == "")
{
echo "<p class=bodymd>Your Age<br><input type=text name=Age></p>";
}
else
{
echo "<input type=hidden name=Age value=$Age>";
}

if ($Email == "")
{
echo "<p class=bodymd>Your Email<br><input type=text name=Email></p>";
}
else
{
echo "<input type=hidden name=Email value=$Email>";
}

if ($Address == "")
{
echo "<p class=bodymd>Your Address<br><input type=text name=Address></p>";
}
else
{
echo "<input type=hidden name=Address value=$Address";
}

if ($City == "")
{
echo "<p class=bodymd>City<br><input type=text name=City></p>";
}
else
{
echo "<input type=hidden name=City value=$City>";
}

if ($State == "")
{
echo "<p class=bodymd>State<br><input type=text name=State></p>";
}
else
{
echo "<input type=hidden name=State value=$State>";
}

if ($Zip == "")
{
echo "<p class=bodymd>Zip Code<br><input type=text name=Zip></p>";
}
else
{
echo "<input type=hidden name=Zip value=$Zip>";
}

if ($Comments == "")
{
echo "<p class=bodymd>Comments or Questions<br><textarea name=Comments rows=5 cols=40></textarea></p>";
}
else
{
echo "<input type=hidden name=Comments value=$Comments>";
}

if (($Name == "") || ($Age == "") || ($Email == ") || ($Address == "") || ($City == "") || ($State == "") || ($Zip == "") || ($Comments == ""))
{
echo "<input type=submit name=Submit value=Submit>";
echo "<input type=reset name=Reset value=Clear Form>";
echo "</form>";
}
else
{
$message = "Name: $Name\nAge: $Age\nEmail: $Email\nAddress: $Address\nCity: $City\nState: $State\nZip: $Zip\nComments: $Comments\n";
$extra = "From: $Name\r\nReply-To: $Email\r\n";
mail ("FlipC@WCSquad.com", "Website Email", $message, $extra);
echo "<p class=bodymd>Thanks for signing up!, $Name.</p>";
echo "<p class=bodymd>A response will be sent to $Email as soon as possible. You will have to reply for final confirmation of regisitration</p>";
}
?>




The HTML page that goes along with this:


<Body>
<form name="form" method="post" action="submit_thanks.php">

<p class="bodymd">Your Name<br>
<input type="text" name="Name">
</p>

<p class="bodymd">Your Age<br>
<input type="text" name="Age">
</p>

<p class="bodymd">Your Email<br>
<textarea name="Email" rows="1" cols="50"></textarea>
</p>

<p class="bodymd">Your Address<br>
<textarea name="Address" rows="1" cols="50"></textarea>
</p>

<p class="bodymd">City<br>
<input type="text" name="City">
</p>

<p class="bodymd">State<br>
<input type="text" name="State">
</p>

<p class="bodymd">Zip Code<br>
<input type="text" name="Zip">
</p>

<p class="bodymd">Comments or Questions<br>
<textarea name="Comments" rows="5" cols="40"></textarea>
</p>

<p class="bodymd">
<input type="submit" name="Submit" value="Submit">
<input type="reset" name="Reset" value="Clear Form">
</p>

</form>
</Body>



I keep getting a parse error on line 3.

Thanks in advance.

Flip C.

crusty_php
06-28-2002, 05:05 PM
($Email == ") on line 3

Anon
06-28-2002, 07:06 PM
Thank you so very much Martin...
Just one of those days... looking for something that was on on the tip of my nose...
shew.

P

Flip C.