italianrock72 Posted June 22, 2009 Share Posted June 22, 2009 I am pretty new to PHP. I have a basic understanding of HTML, but I know that's nothing like PHP. I use Dreamweaver 8 for my webpage. I have a basic PHP page that my old IT guy made, which he left his job to start a company of his own. That has a form for people to fill out including, Name, Email, Company Name, Address, City, State, ZIP, Phone, along with a List/Menu of what they are Interested In, and a Comments section. Which then once submitted, e-mails to sales personnel. I want to add some new Text Fields for my customers to able to register online basic information for a product they just bought instead of having to mail something in. I added the text field's and it seems I had everything set up with the PHP, but when I submit, it always says I get a parse error on the new things I have added for people to fill out. Everything new is set up exactly like the way the old code was written. Any help? Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/ Share on other sites More sharing options...
kickstart Posted June 22, 2009 Share Posted June 22, 2009 Hi It is probably something small, but without seeing the code not much I can say. Post the code (blank out any passwords in it, and probably the email address it goes to) and I will have a quick check. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861252 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 Alright Keith, I got 4 different things of Code, 2 from the working PHP and 2 from the PHP I am trying to get to work. I will post in this order. This Post: 1st working Code in html Next Post: 2nd working Code straight PHP 3rd Post: 1st non-working Code in html 4th Post: 2nd non-working Code in PHP. Also, I've used to BLANK to blank out things. Hope's this helps you solve my question. Thanks! <HTML> <HEAD> <TITLE>BUSINESS BLANK</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <script type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> <!-- .style3 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; } .style19 { color: #FFFFFF; font-size: 12px; font-family: Arial, Helvetica, sans-serif; } .style22 {color: #22397D; font-size: 12px; font-family: Arial, Helvetica, sans-serif; } .style23 {color: #FFFFFF} .style26 {color: #FFFFFF; font-weight: bold; font-family: Arial, Helvetica, sans-serif; } .contactformreq { background-color: #FFFFCC; } .contactformoption { background-color: #D0D0FB; } .style27 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; } .style28 {color: #FF0000} --> </style> <meta name="keywords" content="Contact information, phone, fax, toll free, mailing address, physical address, questions, email, customer service representative"> <meta name="description" content="contact information "> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/Web_Layout-pressed_08.gif','images/Web_Layout-pressed_09.gif','images/Web_Layout-pressed_10.gif','images/Web_Layout-pressed_11.gif','images/Web_Layout-pressed_12.gif','images/Web_Layout-pressed_13.gif')"> <TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD height="42" COLSPAN=5 align="center" valign="bottom" nowrap background="images/Web_Layout_01.gif"></TD> <TD> <a href="index.html"><IMG SRC="images/Web_Layout_02.gif" ALT="" WIDTH=50 HEIGHT=42 border="0"></a></TD> <TD COLSPAN=2> <a href="links.htm"><IMG SRC="images/Web_Layout_03.gif" ALT="" WIDTH=47 HEIGHT=42 border="0"></a></TD> <TD> <a href="sitemap2.html"><IMG SRC="images/Web_Layout_04.gif" ALT="" WIDTH=57 HEIGHT=42 border="0"></a></TD> <TD COLSPAN=5> <IMG SRC="images/Web_Layout_05.gif" WIDTH=347 HEIGHT=42 ALT=""></TD> </TR> <TR> <TD COLSPAN=14> <IMG SRC="images/Web_Layout_06.jpg" WIDTH=780 HEIGHT=207 ALT=""></TD> </TR> <TR> <TD> <IMG SRC="images/Web_Layout_07.gif" WIDTH=90 HEIGHT=38 ALT=""></TD> <TD><a href="commonvehicleupfittingsolutions.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image40','','images/Web_Layout-pressed_08.gif',1)"><img src="images/Web_Layout_08.gif" alt="Common Vehicle Solutions upfitted by Us" name="Image40" width="120" height="38" border="0"></a></TD> <TD COLSPAN=5><a href="BLANK" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','images/Web_Layout-pressed_09.gif',1)"><img src="images/Web_Layout_09.gif" alt="Online Parts Ordering System" name="Image41" width="122" height="38" border="0"></a></TD> <TD COLSPAN=3><a href="BLANK" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image42','','images/Web_Layout-pressed_10.gif',1)"><img src="images/Web_Layout_10.gif" alt="About the Company" name="Image42" width="123" height="38" border="0"></a></TD> <TD><a href="contactupfitters.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image43','','images/Web_Layout-pressed_11.gif',1)"><img src="images/Web_Layout_11.gif" alt="BLANK" name="Image43" width="104" height="38" border="0"></a></TD> <TD><a href="links.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image44','','images/Web_Layout-pressed_12.gif',1)"><img src="images/Web_Layout_12.gif" alt="Related Business Links" name="Image44" width="97" height="38" border="0"></a></TD> <TD><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image45','','images/Web_Layout-pressed_13.gif',1)"><img src="images/Web_Layout_13.gif" alt="Back to Our Main Page" name="Image45" width="85" height="38" border="0"></a></TD> <TD> <IMG SRC="images/Web_Layout_14.gif" WIDTH=39 HEIGHT=38 ALT=""></TD> </TR> <TR> <TD COLSPAN=14 background="images/caps02fill.gif"><img src="images/contactus.gif" width=536 height=52 alt="Other"></TD> </TR> <TR> <TD COLSPAN=14 background="images/bgs02.gif"><table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="style23"><h2 align="center">Contact Information </h2></td> </tr> <tr> <td><table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><div align="center"> <p class="style27">Phone: (574).264.2530<br> Fax: (574).264.5630<br> <strong>Toll Free: (800).505.2530</strong></p> </div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td width="50%"><div align="center"><span class="style3"><strong>Mailing Address: </strong><br> BLANK<br> BLANK</span></div></td> <td width="50%"><div align="center"><span class="style3"><strong>Physical Address:</strong><br> BLANK<br> BLANK</span></div></td> </tr> </table> </td> </tr> <tr> <td> </td> </tr> <tr> <td class="style27"><div align="justify">If you have questions about our products or wish to place an order, you can reach us by phone.</div></td> </tr> <tr> <td> </td> </tr> <tr> <td><h2 align="center"><span class="style23">Online Form </span></h2></td> </tr> <tr> <td><table width="387" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td><form method="POST" action="contact.php"> <div align="right"><strong class="style22"><br> Fields marked <span class="style26"><img src="images/required_field.gif" width="21" height="15"></span> are required </strong><br> </div> <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td class="style26">Full Name:</td> <td class="style26"><input name="Name" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Email:</td> <td class="style26"><input name="EmailFrom" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Company:</td> <td class="style26"><input name="Company" type="text" class="contactformoption"></td> </tr> <tr> <td class="style26">Address:</td> <td class="style26"><input name="Address" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26"> </td> <td class="style26"><input name="Address2" type="text" class="contactformoption"></td> </tr> <tr> <td class="style26">City:</td> <td class="style26"><input name="City" type="text" class="contactformreq" size="30" maxlength="50"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26"><div align="left">State:</div></td> <td class="style26"><input name="State" type="text" class="contactformreq" size="5"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Zip Code:</td> <td class="style26"><input name="PostCode" type="text" class="contactformreq" size="8" maxlength="10"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Phone:</td> <td class="style26"><input name="Telephone" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> </table> <p align="center"><span class="style26">Interested In:</span><BR> <select name='Interest' class="contactformoption" id="Interest"> <option value="null">Please Choose One</option> <option value="Other">Other</option> </select> <p align="center"><span class="style26">How did you find our website? </span><br> <textarea name="findus" cols="30" rows="2" class="contactformoption" id="findus"></textarea> <p align="center"><span class="style26">Comments/Questions:</span><br> <textarea name="Comments" cols="50" rows="4" class="contactformoption"></textarea> <p align="center"> <input type="submit" name="submit" value="Submit"> </form></td> </tr> </table></td> </tr> </table> <div align="center"><br> <br> </div> <div align="center"><a href="BLANK"></a></div></TD> </TR> <TR> <TD height="41" COLSPAN=14 background="images/Web_Layout_29.gif"> </TD> </TR> <TR> <TD COLSPAN=14> <IMG SRC="images/Web_Layout_30.gif" WIDTH=780 HEIGHT=9 ALT=""></TD> </TR> <TR> <TD COLSPAN=14><span class="style3">Copyright © BLANK. All rights reserved.</span><br> <span class="style3">Webmaster: <a href="mailto:me@BLANK.COM">me@BLANK.com</a></span></TD> </TR> <TR> <TD COLSPAN=14> </TD> </TR> <TR> <TD> <IMG SRC="images/spacer.gif" WIDTH=90 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=120 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=28 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=35 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=50 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=3 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=44 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=57 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=22 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=104 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=97 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=85 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=39 HEIGHT=1 ALT=""></TD> </TR> </TABLE> <script src="http://www.google-analytics.com/BLANK" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "BLANK"; BLANKTracker(); </script> </Body> </HTML> Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861373 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 <?php function GetIP() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) $ip = getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ip = $_SERVER['REMOTE_ADDR']; else $ip = "unknown"; return($ip); } $ipaddr = GetIP(); $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "me@BLANK.com"; $Subject = "Online Form"; $Name = Trim(stripslashes($_POST['Name'])); $Address = Trim(stripslashes($_POST['Address'])); $Address2 = Trim(stripslashes($_POST['Address2'])); $Telephone = Trim(stripslashes($_POST['Telephone'])); $Comments = Trim(stripslashes($_POST['Comments'])); $City = Trim(stripslashes($_POST['City'])); $State = Trim(stripslashes($_POST['State'])); $PostCode = Trim(stripslashes($_POST['PostCode'])); $Company = Trim(stripslashes($_POST['Company'])); $Interest = Trim(stripslashes($_POST['Interest'])); $findus = Trim(stripslashes($_POST['findus'])); $hostaddress = gethostbyaddr($ip); $browser = $_SERVER['HTTP_USER_AGENT']; $referred = $_SERVER['HTTP_REFERER']; // VALIDATE! $validationOK=true; if (Trim($Name)=="") $validationOK=false; if (Trim($EmailFrom)=="") $validationOK=false; if (Trim($City)=="") $validationOK=false; if (Trim($State)=="") $validationOK=false; if (Trim($Address)=="") $validationOK=false; if (Trim($Telephone)=="") $validationOK=false; if (Trim($PostCode)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">"; exit; } // PREPARE EMAIL! $Body = ""; $Body .= "Full Name: "; $Body .= $Name; $Body .= "\n"; $Body .= "Email Address: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "\n"; $Body .= "Address Line 1: "; $Body .= $Address; $Body .= "\n"; $Body .= "Address Line 2: "; $Body .= $Address2; $Body .= "\n"; $Body .= "City: "; $Body .= $City; $Body .= "\n"; $Body .= "State: "; $Body .= $State; $Body .= "\n"; $Body .= "Zip Code: "; $Body .= $PostCode; $Body .= "\n"; $Body .= "Company Name: "; $Body .= $Company; $Body .= "\n"; $Body .= "Telephone: "; $Body .= $Telephone; $Body .= "\n"; $Body .= "Interested In: "; $Body .= $Interest; $Body .= "\n"; $Body .= "How did they find us: "; $Body .= $findus; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "TECHNICAL INFORMATION: "; $Body .= "\n"; $Body .= "\n"; $Body .= "Users IP: "; $Body .= $ipaddr; $Body .= "\n"; $Body .= "\n"; $Body .= "Users Host: "; $Body .= $hostaddress; $Body .= "\n"; $Body .= "\n"; $Body .= "Browser: "; $Body .= $browser; $Body .= "\n"; $Body .= "\n"; // SENDING EMAIL ! $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // Redirect to completed page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=success.htm\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861374 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 <HTML> <HEAD> <TITLE>BUSINESS BLANK</TITLE> <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1"> <script type="text/JavaScript"> <!-- function MM_swapImgRestore() { //v3.0 var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc; } function MM_preloadImages() { //v3.0 var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array(); var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++) if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}} } function MM_findObj(n, d) { //v4.01 var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) { d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);} if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n]; for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document); if(!x && d.getElementById) x=d.getElementById(n); return x; } function MM_swapImage() { //v3.0 var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3) if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];} } //--> </script> <style type="text/css"> <!-- .style3 {font-family: Arial, Helvetica, sans-serif; font-size: 12px; } .style22 {color: #22397D; font-size: 12px; font-family: Arial, Helvetica, sans-serif; } .style23 {color: #FFFFFF} .style26 {color: #FFFFFF; font-weight: bold; font-family: Arial, Helvetica, sans-serif; } .contactformreq { background-color: #FFFFCC; } .contactformoption { background-color: #D0D0FB; } .style27 { font-family: Arial, Helvetica, sans-serif; font-size: 14px; } .style67 {color: #333333; font-weight: bold; font-family: Arial, Helvetica, sans-serif; } .style68 {color: #000000; font-weight: bold; font-family: Arial, Helvetica, sans-serif; } .style69 { font-size: 12px; font-style: italic; color: #FFFF00; } --> </style> <meta name="keywords" content="Contact information, phone, fax, toll free, mailing address, physical address, questions, email, customer service representative"> <meta name="description" content="contact information "> </HEAD> <BODY BGCOLOR=#FFFFFF LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 onLoad="MM_preloadImages('images/Web_Layout-pressed_08.gif','images/Web_Layout-pressed_09.gif','images/Web_Layout-pressed_10.gif','images/Web_Layout-pressed_11.gif','images/Web_Layout-pressed_12.gif','images/Web_Layout-pressed_13.gif')"> <TABLE WIDTH=780 BORDER=0 CELLPADDING=0 CELLSPACING=0> <TR> <TD height="42" COLSPAN=5 align="center" valign="bottom" nowrap background="images/Web_Layout_01.gif"></TD> <TD> <a href="index.html"><IMG SRC="images/Web_Layout_02.gif" ALT="" WIDTH=50 HEIGHT=42 border="0"></a></TD> <TD COLSPAN=2> <a href="links.htm"><IMG SRC="images/Web_Layout_03.gif" ALT="" WIDTH=47 HEIGHT=42 border="0"></a></TD> <TD> <a href="sitemap2.html"><IMG SRC="images/Web_Layout_04.gif" ALT="" WIDTH=57 HEIGHT=42 border="0"></a></TD> <TD COLSPAN=5> <IMG SRC="images/Web_Layout_05.gif" WIDTH=347 HEIGHT=42 ALT=""></TD> </TR> <TR> <TD COLSPAN=14><img src="images/BLANK/web_Layout_101.jpg" alt="BLANK" width="780" height="207"></TD> </TR> <TR> <TD> <IMG SRC="images/Web_Layout_07.gif" WIDTH=90 HEIGHT=38 ALT=""></TD> <TD><a href="BLANK.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image40','','images/Web_Layout-pressed_08.gif',1)"><img src="images/Web_Layout_08.gif" alt="Common Vehicle Solutions upfitted by Us" name="Image40" width="120" height="38" border="0"></a></TD> <TD COLSPAN=5><a href="onlinepartsordersAC.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','images/Web_Layout-pressed_09.gif',1)"><img src="images/Web_Layout_09.gif" alt="Online Parts Ordering System" name="Image41" width="122" height="38" border="0"></a></TD> <TD COLSPAN=3><a href="BLANK.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image42','','images/Web_Layout-pressed_10.gif',1)"><img src="images/Web_Layout_10.gif" alt="About the Company" name="Image42" width="123" height="38" border="0"></a></TD> <TD><a href="contactupfittersAC.php" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image43','','images/Web_Layout-pressed_11.gif',1)"><img src="images/Web_Layout_11.gif" alt="Contact Information for BLANK" name="Image43" width="104" height="38" border="0"></a></TD> <TD><a href="linksAC.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image44','','images/Web_Layout-pressed_12.gif',1)"><img src="images/Web_Layout_12.gif" alt="Related Business Links" name="Image44" width="97" height="38" border="0"></a></TD> <TD><a href="BLANK.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image45','','images/Web_Layout-pressed_13.gif',1)"><img src="images/Web_Layout_13.gif" alt="Back to Our Main Page" name="Image45" width="85" height="38" border="0"></a></TD> <TD> <IMG SRC="images/Web_Layout_14.gif" WIDTH=39 HEIGHT=38 ALT=""></TD> </TR> <TR> <TD COLSPAN=14 background="images/caps02fill.gif"><img src="images/contactus.gif" width=536 height=52 alt="Other"></TD> </TR> <TR> <TD COLSPAN=14 background="images/bgs02.gif"><table width="596" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="596" class="style23"><h2 align="center">ONLINE REGISTRATION </h2></td> </tr> <tr> <td> </td> </tr> <tr></tr> <tr></tr> <tr></tr> <tr> <td><h2 align="center"><span class="style23">Online Registration </span></h2></td> </tr> <tr> <td><table width="555" height="876" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="452"><form method="POST" action="contactWarrantyAC.php"> <div align="right"><strong class="style22"><br> Fields marked <span class="style26"><img src="images/required_field.gif" width="21" height="15"></span> are required </strong><br> </div> <table width="109%" height="484" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td width="53%" class="style26">BLANK (ACMI #): <span class="style69">What's This? </span></td> <td width="47%" class="style26"><input name="BLANK Production No." type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">VIN No. :</td> <td class="style26"><input name="VIN No." type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Delivery Date/Sales Date:</td> <td class="style26"><select name="Delivery Date Month" class="contactformreq"> <option value="null">Month</option> <option value="January">January</option> <option value="February">February</option> <option value="March">March</option> <option value="April">April</option> <option value="May">May</option> <option value="June">June</option> <option value="July">July</option> <option value="August">August</option> <option value="September">September</option> <option value="October">October</option> <option value="November">November</option> <option value="December">December</option> </select> <select name="Selling Day" class="contactformreq"> <option value="null">Day</option> <option value="01">01</option> <option value="02">02</option> <option value="03">03</option> <option value="04">04</option> <option value="05">05</option> <option value="06">06</option> <option value="07">07</option> <option value="08">08</option> <option value="09">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> <option value="13">13</option> <option value="14">14</option> <option value="15">15</option> <option value="16">16</option> <option value="17">17</option> <option value="18">18</option> <option value="19">19</option> <option value="20">20</option> <option value="21">21</option> <option value="22">22</option> <option value="23">23</option> <option value="24">24</option> <option value="25">25</option> <option value="26">26</option> <option value="27">27</option> <option value="28">28</option> <option value="29">29</option> <option value="30">30</option> <option value="31">31</option> </select> <select name="Selling Year" class="contactformreq"> <option value="null">Year</option> <option value="1982">1982</option> <option value="1983">1983</option> <option value="1984">1984</option> <option value="1985">1985</option> <option value="1986">1986</option> <option value="1987">1987</option> <option value="1988">1988</option> <option value="1989">1989</option> <option value="1990">1990</option> <option value="1991">1991</option> <option value="1992">1992</option> <option value="1993">1993</option> <option value="1994">1994</option> <option value="1995">1995</option> <option value="1996">1996</option> <option value="1997">1997</option> <option value="1998">1998</option> <option value="1999">1999</option> <option value="2000">2000</option> <option value="2001">2001</option> <option value="2002">2002</option> <option value="2003">2003</option> <option value="2004">2004</option> <option value="2005">2005</option> <option value="2006">2006</option> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> </select> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Chassis Brand :</td> <td class="style26"><input name="Chassis Brand" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Odometer Reading :</td> <td class="style26"><input name="Odometer Reading" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style68">Owner Information </td> <td class="style26"> </td> </tr> <tr> <td class="style26">Name:</td> <td class="style26"><input name="Owner Name" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Address:</td> <td class="style26"><input name="Owner Address" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">City:</td> <td class="style26"><input name="Owner City" type="text" class="contactformreq" size="25" maxlength="50"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">State:</td> <td class="style26"><label> <select name="Owner State" class="contactformreq"> <option value="null">State</option> <option value="AK">AK</option> <option value="AL">AL</option> <option value="AR">AR</option> <option value="AZ">AZ</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DC">DC</option> <option value="DE">DE</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="IA">IA</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="MA">MA</option> <option value="MD">MD</option> <option value="ME">ME</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MO">MO</option> <option value="MS">MS</option> <option value="MT">MT</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="NE">NE</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NV">NV</option> <option value="NY">NY</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VA">VA</option> <option value="VT">VT</option> <option value="WA">WA</option> <option value="WI">WI</option> <option value="WV">WV</option> <option value="WY">WY</option> </select> </label> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">ZIP Code:</td> <td class="style26"><input name="Owner ZIP Code" type="text" class="contactformreq" size="8" maxlength="10"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">Phone No:</td> <td class="style26"><input name="Owner Phone No." type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">E-mail:</td> <td class="style26"><input name="EmailFrom" type="text" class="contactformoption"></td> </tr> <tr> <td class="style26">Web Address:</td> <td class="style26"><input name="Owner Web Address" type="text" class="contactformoption"></td> </tr> <tr> <td class="style26"><span class="style67">Selling Dealer Information</span></td> <td class="style26"> </td> </tr> <tr> <td class="style26">Name:</td> <td class="style26"><input name="Selling Dealer Name" type="text" class="contactformreq"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">City:</td> <td class="style26"><input name="Selling Dealer City" type="text" class="contactformreq" size="25" maxlength="50"> <img src="images/required_field.gif" width="21" height="15"></td> </tr> <tr> <td class="style26">State:</td> <td class="style26"><select name="Selling Dealer State" class="contactformreq"> <option value="null">State</option> <option value="AK">AK</option> <option value="AL">AL</option> <option value="AR">AR</option> <option value="AZ">AZ</option> <option value="CA">CA</option> <option value="CO">CO</option> <option value="CT">CT</option> <option value="DC">DC</option> <option value="DE">DE</option> <option value="FL">FL</option> <option value="GA">GA</option> <option value="HI">HI</option> <option value="IA">IA</option> <option value="ID">ID</option> <option value="IL">IL</option> <option value="IN">IN</option> <option value="KS">KS</option> <option value="KY">KY</option> <option value="LA">LA</option> <option value="MA">MA</option> <option value="MD">MD</option> <option value="ME">ME</option> <option value="MI">MI</option> <option value="MN">MN</option> <option value="MO">MO</option> <option value="MS">MS</option> <option value="MT">MT</option> <option value="NC">NC</option> <option value="ND">ND</option> <option value="NE">NE</option> <option value="NH">NH</option> <option value="NJ">NJ</option> <option value="NM">NM</option> <option value="NV">NV</option> <option value="NY">NY</option> <option value="OH">OH</option> <option value="OK">OK</option> <option value="OR">OR</option> <option value="PA">PA</option> <option value="RI">RI</option> <option value="SC">SC</option> <option value="SD">SD</option> <option value="TN">TN</option> <option value="TX">TX</option> <option value="UT">UT</option> <option value="VA">VA</option> <option value="VT">VT</option> <option value="WA">WA</option> <option value="WI">WI</option> <option value="WV">WV</option> <option value="WY">WY</option> </select> <img src="images/required_field.gif" width="21" height="15"></td> </tr> </table> <p align="center"><span class="style26">Comments/Questions:</span><br> <textarea name="Comments" cols="50" rows="4" class="contactformoption"></textarea> <p align="center"> <input type="submit" name="submit" value="Submit"> </form></td> </tr> </table> <p> </p> <table width="500" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td colspan="2"><div align="center"> <p class="style27">Phone: (574).264.2530<br> Fax: (574).264.5630<br> <strong>Toll Free: (800).283.3993</strong></p> </div></td> </tr> <tr> <td> </td> <td> </td> </tr> <tr> <td width="50%"><div align="center"><span class="style3"><strong>Mailing Address: </strong><br> P.O. Box 1931 <br> Elkhart Indiana 46515-1931</span></div></td> <td width="50%"><div align="center"><span class="style3"><strong>Physical Address:</strong><br> 2940 Dexter Drive<br> Elkhart, IN 46514-8226</span></div></td> </tr> </table> <div align="justify"> <p>If you have questions about our Online Registration, you can reach us by phone, fax, regular mail, or use the email form below. A customer service representative will be in contact with you soon.</p> <p> </p> </div> <p> </p> <p> </p></td> </tr> </table> <div align="center"><br> <br> </div> <div align="center"><a href="BLANK.com"></a></div></TD> </TR> <TR> <TD height="41" COLSPAN=14 background="images/Web_Layout_29.gif"> </TD> </TR> <TR> <TD COLSPAN=14> <IMG SRC="images/Web_Layout_30.gif" WIDTH=780 HEIGHT=9 ALT=""></TD> </TR> <TR> <TD COLSPAN=14><span class="style3">Copyright © 2006, BLANK. All rights reserved.</span><br> <span class="style3">Webmaster: <a href="mailto:me@BLANK.com">me@BLANK.com</a></span></TD> </TR> <TR> <TD COLSPAN=14> </TD> </TR> <TR> <TD> <IMG SRC="images/spacer.gif" WIDTH=90 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=120 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=28 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=6 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=35 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=50 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=3 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=44 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=57 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=22 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=104 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=97 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=85 HEIGHT=1 ALT=""></TD> <TD> <IMG SRC="images/spacer.gif" WIDTH=39 HEIGHT=1 ALT=""></TD> </TR> </TABLE> <script src="BLANK" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "BLANK"; urchinTracker(); </script> </Body> </HTML> Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861376 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 <?php function GetIP() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) $ip = getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ip = $_SERVER['REMOTE_ADDR']; else $ip = "unknown"; return($ip); } $ipaddr = GetIP(); $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "me@BLANK.com"; $Subject = "ONLINE REGISTRATION"; $BLANK (ACMI #): = Trim(stripslashes($_POST['BLANK (ACMI #):'])); $VIN No. = Trim(stripslashes($_POST['VIN No.'])); $Delivery Date Month;$Selling Day;$Selling Year = Trim(stripslashes($_POST['Delivery Date Month;$Selling Day;$Selling Year'])); $Chassis Brand = Trim(stripslashes($_POST['Chassis Brand'])); $Odometer Reading = Trim(stripslashes($_POST['Odometer Reading'])); $Owner Name = Trim(stripslashes($_POST['Owner Name'])); $Owner Address = Trim(stripslashes($_POST['Owner Address'])); $Owner City = Trim(stripslashes($_POST['Owner City'])); $Owner State = Trim(stripslashes($_POST['Owner State'])); $Owner ZIP Code = Trim(stripslashes($_POST['Owner ZIP Code'])); $Owner Phone No. = Trim(stripslashes($_POST['Owner Phone No.'])); $Owner Web Address = Trim(stripslashes($_POST['Owner Web Address'])); $Selling Dealer Name = Trim(stripslashes($_POST['Selling Dealer Name'])); $Selling Dealer City = Trim(stripslashes($_POST['Selling Dealer City'])); $Selling Dealer State = Trim(stripslashes($_POST['Selling Dealer State'])); $Comments = Trim(stripslashes($_POST['Comments'])); $hostaddress = gethostbyaddr($ip); $browser = $_SERVER['HTTP_USER_AGENT']; $referred = $_SERVER['HTTP_REFERER']; // VALIDATE! $validationOK=true; if (Trim($BLANK (ACMI #): )=="") $validationOK=false; if (Trim($VIN No.)=="") $validationOK=false; if (Trim($Delivery Date Month;$Selling Day;$Selling Year)=="") $validationOK=false; if (Trim($Chassis Brand)=="") $validationOK=false; if (Trim($Odometer Reading)=="") $validationOK=false; if (Trim($Owner Name)=="") $validationOK=false; if (Trim($Owner Address)=="") $validationOK=false; if (Trim($Owner City)=="") $validationOK=false; if (Trim($Owner State)=="") $validationOK=false; if (Trim($Owner ZIP Code)=="") $validationOK=false; if (Trim($Owner Phone No.)=="") $validationOK=false; if (Trim($Selling Dealer Name)=="") $validationOK=false; if (Trim($Selling Dealer City)=="") $validationOK=false; if (Trim($Selling Dealer State)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">"; exit; } // PREPARE EMAIL! $Body = ""; $Body .= "ACMI #: "; $Body .= $BLANK (ACMI #): ; $Body .= "\n"; $Body .= "VIN #: "; $Body .= $VIN No.; $Body .= "\n"; $Body .= "Delivery Date/Sales Date: "; $Body .= $Delivery Date Month;$Selling Day;$Selling Year; $Body .= "\n"; $Body .= "Chassis Brand: "; $Body .= $Chassis Brand; $Body .= "\n"; $Body .= "Odometer Reading: "; $Body .= $Odometer Reading; $Body .= "\n"; $Body .= "Owner Name: "; $Body .= $Owner Name; $Body .= "\n"; $Body .= "Owner Address: "; $Body .= $Owner Address; $Body .= "\n"; $Body .= "Owner City: "; $Body .= $Owner City; $Body .= "\n"; $Body .= "Owner State: "; $Body .= $Owner State; $Body .= "\n"; $Body .= "Owner ZIP Code: "; $Body .= $Owner ZIP Code; $Body .= "\n"; $Body .= "Owner Phone No.: "; $Body .= $Owner Phone No.; $Body .= "\n"; $Body .= "Owner E-mail: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "Owner Web Address: "; $Body .= $Owner Web Address; $Body .= "\n"; $Body .= "Selling Dealer Name: "; $Body .= $Selling Dealer Name; $Body .= "\n"; $Body .= "Selling Dealer City: "; $Body .= $Selling Dealer City; $Body .= "\n"; $Body .= "Selling Dealer State: "; $Body .= $Selling Dealer State; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "TECHNICAL INFORMATION: "; $Body .= "\n"; $Body .= "\n"; $Body .= "Users IP: "; $Body .= $ipaddr; $Body .= "\n"; $Body .= "\n"; $Body .= "Users Host: "; $Body .= $hostaddress; $Body .= "\n"; $Body .= "\n"; $Body .= "Browser: "; $Body .= $browser; $Body .= "\n"; $Body .= "\n"; // SENDING EMAIL ! $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // Redirect to completed page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=success.htm\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> Learn to use code tags please ... START HERE Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861377 Share on other sites More sharing options...
kickstart Posted June 22, 2009 Share Posted June 22, 2009 Hi Noticed one thing. You have various form fields with spaces in the names (not really a problem), but to process these you have set up php variables of the same name, complete with spaces. For example the line:- $Chassis Brand = Trim(stripslashes($_POST['Chassis Brand'])); is going to get confused by what you mean by "Brand". With these remove the spaces or replace them with underscores:- $ChassisBrand = Trim(stripslashes($_POST['Chassis Brand'])); OR $Chassis_Brand = Trim(stripslashes($_POST['Chassis Brand'])); Another issue is the "$Blank (ACMI #) " line. There doesn't appear to be a form field for this (although some text is output like it). Also the "#" in php starts a comment on that line. So anything after the # is ignored. Hope this helps. All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861421 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 Alright Keith, I just tried your suggestions, most of it seems to work, except I'm still getting a parse error. This is from line 46 in the .php file, which is my List/Menu with the "if (Trim($Delivery_Date_Month;$Selling_Day;$Selling_Year;)=="") $validationOK=false;" Here's what came up... Parse error: parse error, unexpected ';' in /home/content/m/i/d/BLANKadmin/html/contactBLANK.php on line 46 I will post all the code, with blank leaving covering up things. Please let me know if you can help. I feel like I'm almost there. Thanks! <?php function GetIP() { if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown")) $ip = getenv("HTTP_CLIENT_IP"); else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown")) $ip = getenv("HTTP_X_FORWARDED_FOR"); else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown")) $ip = getenv("REMOTE_ADDR"); else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown")) $ip = $_SERVER['REMOTE_ADDR']; else $ip = "unknown"; return($ip); } $ipaddr = GetIP(); $EmailFrom = Trim(stripslashes($_POST['EmailFrom'])); $EmailTo = "me@BLANK.com"; $Subject = "Online Form"; $ACMI = Trim(stripslashes($_POST['ACMI'])); $VIN = Trim(stripslashes($_POST['VIN'])); $Delivery_Date_Month;$Selling_Day;$Selling_Year = Trim(stripslashes($_POST['Delivery_Date_Month;$Selling_Day;$Selling_Year'])); $Chassis_Brand = Trim(stripslashes($_POST['Chassis_Brand'])); $Odometer_Reading = Trim(stripslashes($_POST['Odometer_Reading'])); $Owner_Name = Trim(stripslashes($_POST['Owner_Name'])); $Owner_Address = Trim(stripslashes($_POST['Owner_Address'])); $Owner_City = Trim(stripslashes($_POST['Owner_City'])); $Owner_State = Trim(stripslashes($_POST['Owner_State'])); $Owner_ZIP = Trim(stripslashes($_POST['Owner_ZIP'])); $Owner_Phone = Trim(stripslashes($_POST['Owner_Phone'])); $Owner_Web_Address = Trim(stripslashes($_POST['Owner_Web_Address'])); $Selling_Dealer_Name = Trim(stripslashes($_POST['Selling_Dealer_Name'])); $Selling_Dealer_City = Trim(stripslashes($_POST['Selling_Dealer_City'])); $Selling_Dealer_State = Trim(stripslashes($_POST['Selling_Dealer_State'])); $Comments = Trim(stripslashes($_POST['Comments'])); $hostaddress = gethostbyaddr($ip); $browser = $_SERVER['HTTP_USER_AGENT']; $referred = $_SERVER['HTTP_REFERER']; // VALIDATE! $validationOK=true; if (Trim($ACMI)=="") $validationOK=false; if (Trim($VIN)=="") $validationOK=false; if (Trim($Delivery_Date_Month;$Selling_Day;$Selling_Year;)=="") $validationOK=false; if (Trim($Chassis_Brand)=="") $validationOK=false; if (Trim($Odometer_Reading)=="") $validationOK=false; if (Trim($Owner_Name)=="") $validationOK=false; if (Trim($Owner_Address)=="") $validationOK=false; if (Trim($Owner_City)=="") $validationOK=false; if (Trim($Owner_State)=="") $validationOK=false; if (Trim($Owner_ZIP)=="") $validationOK=false; if (Trim($Owner_Phone)=="") $validationOK=false; if (Trim($Selling_Dealer_Name)=="") $validationOK=false; if (Trim($Selling_Dealer_City)=="") $validationOK=false; if (Trim($Selling_Dealer_State)=="") $validationOK=false; if (!$validationOK) { print "<meta http-equiv=\"refresh\" content=\"0;URL=index.html\">"; exit; } // PREPARE EMAIL! $Body = ""; $Body .= "ACMI: "; $Body .= $ACMI; $Body .= "\n"; $Body .= "VIN: "; $Body .= $VIN; $Body .= "\n"; $Body .= "Delivery_Date/Sales_Date: "; $Body .= $Delivery_Date_Month;$Selling_Day;$Selling_Year; $Body .= "\n"; $Body .= "Chassis_Brand: "; $Body .= $Chassis_Brand; $Body .= "\n"; $Body .= "Odometer_Reading: "; $Body .= $Odometer_Reading; $Body .= "\n"; $Body .= "Owner_Name: "; $Body .= $Owner_Name; $Body .= "\n"; $Body .= "Owner_Address: "; $Body .= $Owner_Address; $Body .= "\n"; $Body .= "Owner_City: "; $Body .= $Owner_City; $Body .= "\n"; $Body .= "Owner_State: "; $Body .= $Owner_State; $Body .= "\n"; $Body .= "Owner_ZIP: "; $Body .= $Owner_ZIP; $Body .= "\n"; $Body .= "Owner_Phone: "; $Body .= $Owner_Phone; $Body .= "\n"; $Body .= "Owner E-mail: "; $Body .= $EmailFrom; $Body .= "\n"; $Body .= "Owner_Web_Address: "; $Body .= $Owner_Web_Address; $Body .= "\n"; $Body .= "Selling_Dealer_Name: "; $Body .= $Selling_Dealer_Name; $Body .= "\n"; $Body .= "Selling_Dealer_City: "; $Body .= $Selling_Dealer_City; $Body .= "\n"; $Body .= "Selling_Dealer_State: "; $Body .= $Selling_Dealer_State; $Body .= "\n"; $Body .= "Comments: "; $Body .= $Comments; $Body .= "\n"; $Body .= "\n"; $Body .= "\n"; $Body .= "TECHNICAL INFORMATION: "; $Body .= "\n"; $Body .= "\n"; $Body .= "Users IP: "; $Body .= $ipaddr; $Body .= "\n"; $Body .= "\n"; $Body .= "Users Host: "; $Body .= $hostaddress; $Body .= "\n"; $Body .= "\n"; $Body .= "Browser: "; $Body .= $browser; $Body .= "\n"; $Body .= "\n"; // SENDING EMAIL ! $success = mail($EmailTo, $Subject, $Body, "From: <$EmailFrom>"); // Redirect to completed page if ($success){ print "<meta http-equiv=\"refresh\" content=\"0;URL=success.htm\">"; } else{ print "<meta http-equiv=\"refresh\" content=\"0;URL=error.htm\">"; } ?> Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861438 Share on other sites More sharing options...
kickstart Posted June 22, 2009 Share Posted June 22, 2009 Hi Not sure what you are trying to do with that line, unless you want to add the 3 variables together, trim the result and see if it is blank (and thus all of them are blank). If so change the ";" to ".":- if (Trim($Delivery_Date_Month.$Selling_Day.$Selling_Year)=="") $validationOK=false; All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861481 Share on other sites More sharing options...
italianrock72 Posted June 22, 2009 Author Share Posted June 22, 2009 Alright, I got rid of the List/Menu and just put $Delivery_Date and have people fill in the date manually. Except after they hit submit, I can see a quick white parse error page on Line 38 for about a millisecond, and then it sends the person to a Thank You! We will Get back with you shortly page (that it was successfully sent). Which Line38 is "$hostaddress = gethostbyaddr($ip);" any idea on why that shows very shortly??? Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861495 Share on other sites More sharing options...
kickstart Posted June 22, 2009 Share Posted June 22, 2009 Hi Nothing jumps out, except that $ip doesn't seem to be set (but gethostbyaddr() should cope with it I think). Suspect what you want is :- $hostaddress = gethostbyaddr($ipaddr); All the best Keith Quote Link to comment https://forums.phpfreaks.com/topic/163241-have-a-basic-format-need-to-add-more-text-fields/#findComment-861557 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.