On Wed, 2006-03-01 at 23:44 +0000, neilsbohr73 wrote: > I've created an online order form for a client which is to be > emailed to the client after someone fills it out. While testing it > out, I was given this message when I hit the submit button: > > "Parse error: parse error, unexpected T_STRING > in /home/jennhaw/public_html/twinpapers/process.php on line 14" > > Is anyone willing to help me out here? Most of this stuff is over > my head. I must admit that I copied this code from a form generator > offered through my webhost. It was too cryptic to make a form > through that process. > > Thanks in advance to anyone that can help. > > Jen > > The PHP code for the form is: > > <?php > include("global.inc.php"); > > $errors=0; > $error="The following errors occured while processing your form > input.<ul>"; > > pt_register('POST','Name');pt_register('POST','Address1'); > pt_register('POST','Address2'); > > pt_register('POST','City'); > pt_register('POST','State'); > pt_register('POST','ZIP'); > p > t_register('POST','Phone'); > pt_register('POST','EmailAddress'); > pt_register('POST','ShippingName'); > > pt_register('POST','ShippingAddress1'); > pt_register('POST','ShippingAddress2'); > pt_register('POST','ShippingState'); > > pt_register('POST','ShippingZIP'); > pt_register('POST','OrderShipping'); > pt_register('POST','RushOrder'); > > pt_register('POST','Item1Number'); > > pt_register('POST','Item1Name'); > pt_register('POST','FontNumber'); > pt_register('POST','FontColor'); > > pt_register('POST','Quantity'); > pt_register('POST','Personalize'); > > $Personalize=preg_replace("/(\015\012)|(\015)| > (\012)/"," <br />", $Personalize); > pt_register('POST','Layout'); > pt_register('POST','Text'); > pt_register('POST','ReturnAddress'); > > pt_register('POST','ReturnAddress1'); > pt_register('POST','ReturnCity'); > pt_register('POST','ReturnState'); > > pt_register('POST','ReturnZIP'); > pt_register('POST','FaxProof'); > > pt_register('POST','AdditionalComments'); > $AdditionalComments=preg_replace("/(\015\012)|(\015)| > (\012)/"," <br />", > $AdditionalComments); > if($Name=="" || $Address1=="" || $Address2=="" || $City=="" || > $State=="" || $ZIP=="" || $Phone=="" || > $EmailAddress=="" || $OrderShipping=="" || $Item1Number=="" || > $Item1Name=="" || $FontNumber=="" || > $FontColor=="" || $Quantity=="" || $Personalize=="" || $Layout=="" > || $Text=="" || $ReturnAddress=="" || > $FaxProof=="" || $RushOrder=="" ) > { > $errors=1; > $error.="<li>You did not enter one or more of the required fields. > Please go back and try again."; > } > > if($errors==1) echo $error; > else{ > $where_form_is="http". > ($HTTP_SERVER_VARS["HTTPS"]=="on"?"s":"")."://".$SERVER_NAME.strrev > (strstr(strrev($PHP_SELF),"/")); > > $message="Name: ".$Name." > Address1: ".$Address1." > Address2: ".$Address2." > City: ".$City." > State: ".$State." > ZIP: ".$ZIP." > > Phone: ".$Phone." > Email Address: ".$EmailAddress." > Shipping Name: ".$ShippingName." > > Shipping Address1: ".$ShippingAddress1." > Shipping Address2: ".$ShippingAddress2." > > Shipping State: ".$ShippingState." > Shipping ZIP: ".$ShippingZIP." > Order Shipping: ".$OrderShipping." > Rush Order: ".$RushOrder. > Item 1 Number: ".$Item1Number." > Item 1 Name: ".$Item1Name." > Font Number: ".$FontNumber." > Font Color: ".$FontColor." > > Quantity: ".$Quantity." > Personalize: ".$Personalize." > Layout: ".$Layout." > Text: ".$Text." > > Return Address on Envelopes: ".$ReturnAddress." > Return Address: ".$ReturnAddress1." > > Return City: ".$ReturnCity." > Return State: ".$ReturnState." > Return Zip: ".$ReturnZip. > " > Fax Proof: ".$FaxProof." > Additional Comments: ".$AdditionalComments." > "; > > $message = stripslashes($message); > > mail("[EMAIL PROTECTED]","Form Submitted at your > website",$message,"From: phpFormGenerator"); > > > header("Refresh: > 0;url=http://www.hawleyfocus.com/twinpapers/orderconfirm.htm"); > ?><?php > } > ?> > _____________________________________________________________________ > And the html code for the form is: > <form action="http://www.hawleyfocus.com/twinpapers/process.php" > method="post" name="form1"> > <table width="100%" border="1" > bordercolor="#663300" bgcolor="#D0DD88"> > <tr> > <td height="275"> <table width="100%" > border="0" bordercolor="#663300" bgcolor="#D0DD88"> > <tr> > <td colspan="6"><div align="center"> > <h2><br> > Contact Information</h2> > </div></td> > </tr> > <tr> > <td colspan="6"> </td> > </tr> > <tr> > <td width="1%"> </td> > <td width="16%"><h3>Name: </h3></td> > <td width="42%"> <h4> > <input name="Name" type="text" > id="Name2" size="30"> > </h4></td> > <td width="14%"><h3>Phone: </h3></td> > <td width="23%"> <h4> > <input name="Phone" type="text" > id="Phone3" size="20"> > </h4></td> > <td width="4%"><br> </td> > </tr> > <tr> > <td> </td> > <td><h3>Address2: </h3></td> > <td><h4> > <input name="Address" type="text" > id="Address3" size="30"> > </h4></td> > <td><h4>Phone 2: </h4></td> > <td> <h4> > <input name="Phone2" type="text" > id="Phone22" size="20"> > </h4></td> > <td><br> </td> > </tr> > <tr> > <td height="25"> </td> > <td><h4>Address2:</h4></td> > <td><h4> > <input name="Address2" type="text" > id="Address22" size="30"> > </h4></td> > <td><h4>Fax: </h4></td> > <td><h4> > <input name="Fax" type="text" > id="Fax2" size="20"> > </h4></td> > <td><br> </td> > </tr> > <tr> > <td> </td> > <td><h3>City:</h3></td> > <td><h4> > <input name="City" type="text" > id="City2" size="30"> > </h4></td> > <td><h3>Email:</h3></td> > <td><h4> > <input name="Email" type="text" > id="Email2" size="20"> > </h4></td> > <td> </td> > </tr> > <tr> > <td height="26"> </td> > <td><h3>State: </h3></td> > <td><h4> > <input name="State" type="text" > id="State2" size="5" maxlength="2"> > </h4></td> > <td> </td> > <td> </td> > <td> </td> > </tr> > <tr> > <td> </td> > <td><h3>Zip:</h3></td> > <td><h4> > <input name="ZIP" type="text" > id="Zip2" size="12"> > </h4></td> > <td> </td> > <td> </td> > <td> </td> > </tr> > </table></td> > </tr> > </table> > <br> > <table width="100%" border="1" > bordercolor="#663300"> > <tr> > <td height="322" bgcolor="#D0DD88"> <table > width="100%" border="0"> > <tr> > <td height="21" colspan="2"> </td> > </tr> > <tr> > <td height="21" colspan="2"> <div > align="center"> > <h2>Other Information</h2> > </div></td> > </tr> > <tr> > <td height="21" valign="top"> </td> > <td width="76%" align="left" > valign="top"> </td> > </tr> > <tr> > <td width="24%" height="79" > valign="top"> <h3>Shipping > Address:<br> > (if different than above):</h3></td> > <td align="left" valign="top"> <table > width="100%" border="0"> > <tr> > <td width="18%"><h4>Name:</h4></td> > <td width="43%"><h4> > <input name="ShippingName2" > type="text" id="ShippingName23" size="30"> > </h4></td> > <td width="10%"><h4>City:</h4></td> > <td width="29%"><h4> > <input name="ShippingCity" > type="text" id="ShippingCity5" size="20"> > </h4></td> > </tr> > <tr> > <td><h4>Address1:</h4></td> > <td><h4> > <input name="ShippingAddress1" > type="text" id="ShippingAddress12" size="30"> > </h4></td> > <td><h4>State:</h4></td> > <td><h4> > <input name="ShippingState" > type="text" id="ShippingState5" size="5"> > </h4></td> > </tr> > <tr> > <td><h4>Address2:</h4></td> > <td><h4> > <input name="ShippingAddress2" > type="text" id="ShippingAddress25" size="30"> > </h4></td> > <td><h4>ZIP:</h4></td> > <td><h4> > <input name="ShippingZip" > type="text" id="ShippingZip5" size="15"> > </h4></td> > </tr> > </table></td> > </tr> > <tr> > <td valign="top"><h3>Order > Shipping:</h3></td> > <td valign="top"><h4> > <select name="ShippingInstructions" > id="select4"> > <option>---Options---</option> > <option>Ground</option> > <option>3-day Air</option> > <option>2-day Air</option> > <option>Overnight</option> > </select> > </h4></td> > </tr> > <tr> > <td height="31" align="left" > valign="top"> <h3>Rush > Order?</h3></td> > <td align="left" valign="top"><table > width="71%" height="25" border="0"> > <tr> > <td width="22%"><h4> > <input type="radio" > name="Expedite" value="Yes"> > Yes</h4></td> > <td width="19%"><h4> > <input type="radio" > name="Expedite" value="No"> > No</h4></td> > <td width="59%"><h4>(extra fee > applies)</h4></td> > </tr> > </table></td> > </tr> > </table></td> > </tr> > </table> > <br> > <table width="100%" border="1" > bordercolor="#663300"> > <tr> > <td height="525" bgcolor="#D0DD88"> <table > width="100%" border="0"> > <tr> > <td height="21" colspan="4"> <div > align="center"> > <h2><br> > Sweet Pea Item 1 Information</h2> > </div></td> > </tr> > <tr> > <td width="22%" height="40"> <h3>Item > Number:</h3></td> > <td width="21%"><h4> > <input name="Item1Number" > type="text" id="Item1Number2" size="20"> > </h4></td> > <td width="40%"> </td> > <td width="17%"><br> </td> > </tr> > <tr> > <td><h3>Item Name:</h3></td> > <td><h4> > <input name="Item1Name" type="text" > id="Item1Name" size="20"> > </h4></td> > <td> </td> > <td> </td> > </tr> > <tr> > <td><h3>Font: </h3></td> > <td><h4> > <select name="FontNumber" > id="select5"> > <option>---Options---</option> > <option>1</option> > <option>2</option> > <option>3</option> > <option>4</option> > <option>5</option> > <option>6</option> > <option>7</option> > <option>8</option> > <option>9</option> > <option>10</option> > </select> > </h4></td> > <td><a > href="http://www.sweetpeadesigns.com/img.asp?id=4071">Click > here for font examples</a></td> > <td><br> </td> > </tr> > <tr> > <td><h3>Ink Color:</h3></td> > <td><select name="FontColor" > id="select6"> > <option>---Options---</option> > <option>Black</option> > <option>Bright Green</option> > <option>Brown</option> > <option>Pink</option> > <option>Red</option> > <option>Blue</option> > </select></td> > <td><a > href="http://www.noteworthynotes.com/ordering-info.asp? > id=0129&id1=10129&id2=30129&ordering%2Binformation=Ordering% > 2Binformation#">Click > here for ink color examples</a></td> > <td><br> </td> > </tr> > <tr> > <td valign="top"><h3>Quantity:</h3></td> > <td colspan="2" valign="top"><h4> > <input name="Quantity" type="text" > id="Quantity3" size="20"> > </h4></td> > <td> </td> > </tr> > <tr> > <td valign="top"> > <h3>Personalize:</h3></td> > <td colspan="2" valign="top"><textarea > name="Personalize" cols="50" rows="12" id="textarea5"></textarea> > <p> </p></td> > <td><br> </td> > </tr> > <tr> > <td valign="top"><h3>Layout:</h3></td> > <td colspan="2"><h4> > <select name="Layout" id="Layout"> > <option>---Options---</option> > <option>Center</option> > <option>Left</option> > <option>Right</option> > </select> > </h4></td> > <td> </td> > </tr> > <tr> > <td valign="top"><h3>Text:</h3></td> > <td colspan="2"><h4> > <select name="Text" id="Text"> > <option>---Options---</option> > <option>Proper</option> > <option>all lowercase</option> > <option>ALL CAPS</option> > </select> > </h4></td> > <td> </td> > </tr> > <tr> > <td valign="top"> </td> > <td colspan="2"> </td> > <td> </td> > </tr> > </table></td> > </tr> > </table> > <br> > <table width="100%" border="1" > bordercolor="#663300" bgcolor="#D0DD88"> > <tr> > <td height="300"> <table width="100%" > border="0"> > <tr> > <td height="21" colspan="2"> </td> > </tr> > <tr> > <td height="21" colspan="2"> <div > align="center"> > <h2>Other Information</h2> > </div></td> > </tr> > <tr> > <td height="21" valign="top"> </td> > <td width="76%" align="left" > valign="top"> </td> > </tr> > <tr> > <td height="36" valign="top"> <h3>Return > Address<br> > on Envelopes:</h3></td> > <td align="left" valign="top"> <table > width="27%" height="25" border="0"> > <tr> > <td width="52%"><h4> > <input type="radio" > name="ReturnAddress" value="Yes"> > Yes</h4></td> > <td width="48%"><h4> > <input type="radio" > name="ReturnAddress" value="No"> > No</h4></td> > </tr> > </table></td> > </tr> > <tr> > <td width="24%" height="79" > valign="top"> <h3>Return > Address:</h3></td> > <td align="left" valign="top"> <table > width="61%" border="0"> > <tr> > <td > width="30%"><h4>Address:</h4></td> > <td width="70%"><h4> > <input name="ReturnAddress1" > type="text" id="ReturnAddress1" size="30"> > </h4></td> > </tr> > <tr> > <td><h4>City:</h4></td> > <td><h4> > <input name="ReturnCity" > type="text" id="ReturnCity" size="30"> > </h4></td> > </tr> > <tr> > <td><h4>State:</h4></td> > <td><h4> > <input name="ReturnState" > type="text" id="ReturnState" size="5"> > </h4></td> > </tr> > <tr> > <td><h4>ZIP:</h4></td> > <td><h4> > <input name="ReturnZIP" > type="text" id="ReturnZIP" size="15"> > </h4></td> > </tr> > </table></td> > </tr> > <tr> > <td align="left" valign="top"> <h3>Fax > Proof:</h3></td> > <td align="left" valign="top"> <table > width="27%" height="25" border="0"> > <tr> > <td width="52%"><h4> > <input type="radio" > name="FaxProof" value="Yes"> > Yes</h4></td> > <td width="48%"><h4> > <input type="radio" > name="FaxProof" value="No"> > No</h4></td> > </tr> > </table></td> > </tr> > <tr> > <td valign="top"> <h4>Additional > Comments:</h4></td> > <td valign="top"><p> > <textarea name="AdditionalComments" > cols="50" rows="3" id="textarea6"></textarea> > </p></td> > </tr> > </table></td> > </tr> > </table> > <br> > <table width="24%" border="0"> > <tr> > <td width="53%"> <h4 align="center"> > <input type="submit" name="Submit" > value="Submit"> > </h4></td> > <td width="47%"><h4 align="center"> > <input type="reset" name="Submit2" > value="Reset"> > </h4></td> > </tr> > </table> > <br> > <table width="30%" border="0"> > <tr> > <td><input type="image" alt="submit!" > border="0" name="imageField" src="graphics/submit.gif" width="109" > height="41"> > </td> > <td> </td> > </tr> > </table> > <p> </p> > <p> </p> > </form> > _____________________________________________________________________
It looks to me like you have a lonely "p" character on line 14 that the PHP engine doesn't know what to do with... Community email addresses: Post message: php-list@yahoogroups.com Subscribe: [EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED] List owner: [EMAIL PROTECTED] Shortcut URL to this page: http://groups.yahoo.com/group/php-list Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/php-list/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/