DBookatay Posted January 25, 2007 Share Posted January 25, 2007 I paid someone to design required fields in forms that I built, which work properly, but I cant figure out why the results wont insert into my database... (Just to make it easy, I only used 3 of the 100+ values)Also, where on the page should I put a "thank you" code, if everything went ok?The code: (because it was more than the allowed number of characters, I edited 2 of the 3 $show="___" out...)[code]<?phpsession_start(); $page_title = 'EZ Financing Application'; include ('include/forms_content.php'); require_once ('include/mysql_connect.php'); //------------------------new code--------------------------------------------------// if (!isset($_SESSION['ispassed'])) { $_SESSION['ispassed'] = true;//$_SESSION['ispassed']=true; // after all the dust has settled if this is still true, then upload to the database. } function formatText3($inputName1,$inputName2,$inputName3,$text)// checks to verify 3 fields are not empty, and then prints out what needs to be { if ($_SERVER['REQUEST_METHOD']=="POST") { if(empty($_POST[$inputName1]) || empty($_POST[$inputName2]) || empty($_POST[$inputName3]) ) { echo "<span class='redBold'>" . $text . "</span>"; $_SESSION['ispassed']=false; } else { echo $text; } } else echo $text; } function formatText($inputName,$text)//checks a givin field to see if its empty, if so change color and print it out. { if ($_SERVER['REQUEST_METHOD']=="POST") { if(empty($_POST[$inputName])) { echo "<span class='redBold'>" . $text . "</span>"; $_SESSION['ispassed']=false; } else { echo $text; } } else echo $text; } function verifyEmail($inputName,$text)//checks to see if the email is valid { if ($_SERVER['REQUEST_METHOD']=="POST") { if(!(empty($_POST[$inputName]))) { if(eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})", $_POST[$inputName])) { echo $text; } else { echo "<span class='redBold'>" . $text . "</span>"; $_SESSION['ispassed']=false; } } else echo "<b>" . $text . "</b>"; $_SESSION['ispassed']=false; } } function moreThen0Years($inputName)//checks the years field to see if it is required or not. { if ($_SERVER['REQUEST_METHOD']=="POST") { if(($_POST[$inputName])<1) { return true; } else { return false; } } } if($_SESSION['ispassed']) //if true, everything passed and you can upload it to your database and do what you will. { $nmF = ucfirst($_POST['ap_nmF']); $nmM = ucfirst($_POST['ap_nmM']); $nmL = ucfirst($_POST['ap_nmL']); $query = "INSERT INTO creditapps (nmF, nmM, nmL, submitted) VALUES ('$nmF', '$nmM', '$nmL', NOW() )"; $result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error()); } //------------------------end of code-----------------------------------------------// $query = "select * from vehicles where stock = '{$_GET['stock']}'"; $result = mysql_query($query); $row = mysql_fetch_array($result); $stock = ($row['stock']); $year = ($row['year']); $make = ($row['make']); if ($row['trim'] == "N / A") {$model = $row['model'];} else {$model = $row['model'] . ' ' . $row['trim'];} $color = ($row['color_exterior']); if(isset($_GET['vehicle'])); switch($_GET['vehicle']) { case 'true': $vehicle = ' <input type="hidden" name="app_veh1" value="' . $stock . '" /> <input type="hidden" name="app_veh2" value="' . $color . '" /> <table> <tr> <td class="frm">Year</td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm">Make</td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm">Model</td> </tr> <tr> <td><input name="app_veh3" size="3" value="' . $year . '" /></td> <td><input name="app_veh4" size="17" value="' . $make . '" /></td> <td><input name="app_veh5" size="25" value="' . $model . '" /></td> </tr> </table>'; break; default: $vehicle = ' <table> <tr> <td class="frm">Year</td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm">Make</td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm">Model</td> </tr> <tr> <td>'.$vehYears.'</td> <td>'.$vehMakes.'</td> <td>'.$vehModels.'</td> </tr> </table>'; break; } include ('include/header.php'); $app= $_GET['applicant'];?> <table class="SubHldr" width="777" height="31"> <tr><td class="subMenu"><a href="company.php?cat=Terms" onmouseover="MM_swapImage('s1','','images/SubNav/terms_Over.gif',1)" onmouseout="MM_swapImgRestore()"><img src="images/SubNav/terms_Off.gif" width="115" height="21" name="s1" /></a><a href="apply.php"><img src="images/SubNav/apply_On.gif" width="115" height="21" /></a><a href="company.php?cat=Calculator" onmouseover="MM_swapImage('s3','','images/SubNav/calc_Over.gif',1)" onmouseout="MM_swapImgRestore()"><img src="images/SubNav/calc_Off.gif" width="115" height="21" name="s3" /></a><a href="testimonials.php" onmouseover="MM_swapImage('s4','','images/SubNav/testimonials_Over.gif',1)" onmouseout="MM_swapImgRestore()"><img src="images/SubNav/testimonials_Off.gif" width="115" height="21" name="s4" /></a></td></tr> </table> <table class="appHldr"> <tr><td class="pgTitle">EZ Financing Application</td></tr> <tr> <td class="pgText"> <form name="credit" method="post" action="apply.php?applicant=<? echo $app; ?>" onSubmit="return checkme();"> <? if(isset($_GET['applicant'])); //echo $app; switch($_GET['applicant']) { default: ?> In order for us to properly process your information,<br />please choose which application you would like: <div class="appMain"> <select onChange="faqRedirect(this)"> <option>Please Select Your Choice</option> <option value="apply.php?applicant=single" class="red"> Apply As An Individual</option> <option value="apply.php"> ------ or ------</option> <option value="apply.php?applicant=coapply" class="red"> Apply With A Co-Applicant</option> <option value="apply.php"> ------ or ------</option> <option value="apply.php?applicant=business" class="red"> Apply As A Business</option> </select> </div> <p>If you are unsure, <a href="contact.php?body=Request">Request A Call</a> from one of our financing specialists.<p> <p> <a href="#">Why has your EZ Financing application recently changed?</a>'; <? break; case 'single': //$show = ' ?> <div align="center"> <table> <tr> <td class="appHldr_L"> <div class="appTitle">Personal Information</div> <div class="appSecTitle">Name</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_nmF","First:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="5" height="1" /></td> <td class="frm"> M</td> <td rowspan="2"><img src="images/spacer.gif" width="5" height="1" /></td> <td class="frm"><span class="red">*</span><? formatText("ap_nmL","Last:"); ?></td> </tr> <tr> <td><input class="input" maxlength="60" size="17" name="ap_nmF" value="<?php if (isset($_POST['ap_nmF'])) echo $_POST['ap_nmF']; ?>" /></td> <td><input class="1char" maxlength="1" size="1" name="ap_nmM" value="<?php if (isset($_POST['ap_nmM'])) echo $_POST['ap_nmM']; ?>" onKeyup="autotab(this, document.credit.ap_nmL)" /></td> <td><input class="input" maxlength="60" size="17" name="ap_nmL" value="<?php if (isset($_POST['ap_nmL'])) echo $_POST['ap_nmL']; ?>" /></td> </tr> </table> </div> <div class="appSecTitle">Birthday</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_dob1","Month:"); ?></td> <td width="10"> </td> <td class="frm"><span class="red">*</span><? formatText("ap_dob2","Day:"); ?></td> <td width="10"> </td> <td class="frm"><span class="red">*</span><? formatText("ap_dob3","Year:"); ?></td> </tr> <tr> <td><select name="ap_dob1"><option value="<?php if (isset($_POST['ap_dob1'])) echo $_POST['ap_dob1']; ?>"><?php if (isset($_POST['ap_dob1'])) echo $_POST['ap_dob1']; ?></option>'<? echo $months_list;?>'</select></td> <td width="10" align="center"> / </td> <td><select name="ap_dob2"><option value="<?php if (isset($_POST['ap_dob2'])) echo $_POST['ap_dob2']; ?>"><?php if (isset($_POST['ap_dob2'])) echo $_POST['ap_dob2']; ?></option>'<? echo $days; ?>'</select></td> <td width="10" align="center"> / </td> <td><input class="4char" name="ap_dob3" size="3" maxlength="4" value="<?php if (isset($_POST['ap_dob3'])) echo $_POST['ap_dob3']; ?>" onKeyup="autotab(this, document.credit.ap_ss1)" /></td> </tr> </table> </div> <div class="appSecTitle"><span class="red">*</span><? formatText3("ap_ss1","ap_ss2","ap_ss3","Social Security:"); ?></div> <div class="appSecHldr"> <table> <tr> <td class="frm"><input class="3char" type="text" name="ap_ss1" size="3" maxlength="3" value="<?php if (isset($_POST['ap_ss1'])) echo $_POST['ap_ss1']; ?>" onKeyup="autotab(this, document.credit.ap_ss2)" /></td> <td width="10" align="center"> - </td> <td class="frm"><input class="2char" type="text" name="ap_ss2" size="3" maxlength="2" value="<?php if (isset($_POST['ap_ss2'])) echo $_POST['ap_ss2']; ?>" onKeyup="autotab(this, document.credit.ap_ss3)" /></td> <td width="10" align="center"> - </td> <td class="frm"><input class="4char" type="text" name="ap_ss3" size="3" maxlength="4" value="<?php if (isset($_POST['ap_ss3'])) echo $_POST['ap_ss3']; ?>" onKeyup="autotab(this, document.credit.ap_ph1)" /> <a href="javascript:openWin('include/popups/definitions.php?term=SS','520','200','no','no')"><img src="images/icon_Ques.gif" alt="Why do you need my Social Security number?" /></a></td> </tr> </table> </div> <div class="appSecTitle">Contacts</div> <div class="appSecHldr"> <table> <tr><td class="frm"><span class="red">*</span><? formatText3("ap_ph1","ap_ph2","ap_ph3","Home Phone:"); ?></td></tr> <tr><td><input class="3char" name="ap_ph1" size="1" maxlength="3" value="<?php if (isset($_POST['ap_ph1'])) echo $_POST['ap_ph1']; ?>" onKeyup="autotab(this, document.credit.ap_ph2)" /> - <input class="3char" name="ap_ph2" size="1" maxlength="3" value="<?php if (isset($_POST['ap_ph2'])) echo $_POST['ap_ph2']; ?>" onKeyup="autotab(this, document.credit.ap_ph3)" /> - <input class="4char" name="ap_ph3" size="1" maxlength="4" value="<?php if (isset($_POST['ap_ph3'])) echo $_POST['ap_ph3']; ?>" onKeyup="autotab(this, document.credit.ap_ph4)" /></td></tr> <tr><td class="frm"> Cell Phone:</td></tr> <tr><td><input class="3char" name="ap_ph4" size="1" maxlength="3" value="<?php if (isset($_POST['ap_ph4'])) echo $_POST['ap_ph4']; ?>" onKeyup="autotab(this, document.credit.ap_ph5)" /> - <input class="3char" name="ap_ph5" size="1" maxlength="3" value="<?php if (isset($_POST['ap_ph5'])) echo $_POST['ap_ph5']; ?>" onKeyup="autotab(this, document.credit.ap_ph6)" /> - <input class="4char" name="ap_ph6" size="1" maxlength="4" value="<?php if (isset($_POST['ap_ph6'])) echo $_POST['ap_ph6']; ?>" onKeyup="autotab(this, document.credit.ap_email)" /></td></tr> </table> <table> <tr><td class="frm"><span class="red">*</span><? verifyEmail("ap_email", "Email Address:"); ?></td></tr> <tr><td><input class="input" name="ap_email" size="22" maxlength="40" value="<?php if (isset($_POST['ap_email'])) echo $_POST['ap_email']; ?>" /> <a href="javascript:openWin('include/popups/definitions.php?term=Email','520','140','no','no')"><img src="images/icon_Ques.gif" alt="What will you do with my email address?" /></a></td></tr> </table> </div> <div class="appSecTitle">Address</div> <div class="appSecHldr"> <table> <tr><td class="frm" colspan="5"><span class="red">*</span><? formatText("ap_add1","Street:"); ?></td></tr> <tr><td colspan="5"><input class="input" maxlength="60" size="30" name="ap_add1" value="<?php if (isset($_POST['ap_add1'])) echo $_POST['ap_add1']; ?>" /></td></tr> <tr> <td class="frm" class="frm"><span class="red">*</span><? formatText("ap_add2","City:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm" class="frm"><span class="red">*</span><? formatText("ap_add3","State:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm" class="frm"><span class="red">*</span><? formatText("ap_add4","Zip:"); ?></td> </tr> <tr> <td><input class="input" name="ap_add2" size="20" value="<?php if (isset($_POST['ap_add2'])) echo $_POST['ap_add2']; ?>" /></td> <td><select name="ap_add3"><option value="<?php if (isset($_POST['ap_add3'])) echo $_POST['ap_add3']; ?>"><?php if (isset($_POST['ap_add3'])) echo $_POST['ap_add3']; ?></option>'<? echo $states; ?>'</select></td> <td><input class="5char" name="ap_add4" size="2" maxlength="5" value="<?php if (isset($_POST['ap_add4'])) echo $_POST['ap_add4']; ?>" /></td> </tr> </table> </div> <div class="appSecTitle">Length at current address</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_add5","Years:"); ?></td> <td> </td> <td clsss="frm"> <? if(moreThen0Years("ap_add5")) formatText("ap_add6","Months:"); else echo "Months"; ?></td> </tr> <tr> <td valign="top"><select name="ap_add5"><option value="<?php if (isset($_POST['ap_add5'])) echo $_POST['ap_add5']; ?>"><?php if (isset($_POST['ap_add5'])) echo $_POST['ap_add5']; ?></option>'<? echo $years; ?>'</select></td> <td width="20" align="center"> / </td> <td valign="top"><select name="ap_add6"><option value="<?php if (isset($_POST['ap_add6'])) echo $_POST['ap_add6']; ?>"><?php if (isset($_POST['ap_add6'])) echo $_POST['ap_add6']; ?></option>'<? echo $months; ?>'</select></td> </tr> </table> </div> <div class="appSecTitle">Housing Payments</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_add7","Type:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="20" height="1" /></td> <td class="frm"> </td> <td class="frm"><span class="red">*</span><? formatText("ap_add8","Payment:"); ?></td> </tr> <tr> <td valign="top" rowspan="2"> <select name="ap_add7"> <option value="<?php if (isset($_POST['ap_add7'])) echo $_POST['ap_add7']; ?>"><?php if (isset($_POST['ap_add7'])) echo $_POST['ap_add7']; ?></option> <option value="Rent">Rent</option> <option value="Own">Own</option> <option value="Family">Family</option> <option value="Other">Other</option> </select> </td> <td>$ </td> <td><input class="input" name="ap_add8" size="7" maxlength="5" value="<?php if (isset($_POST['ap_add8'])) echo $_POST['ap_add8']; ?>" /> Monthly</td> </tr> </table> </div> <br /> <div class="appTitle">Employment Information</div> <div class="appSecTitle">Company</div> <div class="appSecHldr"> <table> <tr><td colspan="5"><span class="red">*</span><? formatText("ap_wrk1","Company Name:"); ?></td></tr> <tr><td colspan="5"><input class="input" maxlength="60" size="35" name="ap_wrk1" value="<?php if (isset($_POST['ap_wrk1'])) echo $_POST['ap_wrk1']; ?>" /></td></tr> <tr><td class="frm" colspan="5"><span class="red">*</span><? formatText("ap_wrk2","Street:"); ?></td></tr> <tr><td colspan="5"><input class="input" name="ap_wrk2" size="30" maxlength="60" value="<?php if (isset($_POST['ap_wrk2'])) echo $_POST['ap_wrk2']; ?>" /></td></tr> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_wrk3","City:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm"><span class="red">*</span><? formatText("ap_wrk4","State:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm"><span class="red">*</span><? formatText("ap_wrk5","Zip:"); ?></td> </tr> <tr> <td><input class="input" name="ap_wrk3" size="20" value="<?php if (isset($_POST['ap_wrk3'])) echo $_POST['ap_wrk3']; ?>" /></td> <td><select name="ap_wrk4"><option value="<?php if (isset($_POST['ap_wrk4'])) echo $_POST['ap_wrk4']; ?>"><?php if (isset($_POST['ap_wrk4'])) echo $_POST['ap_wrk4']; ?></option>'<? echo $states; ?>'</select></td> <td><input class="5char" name="ap_wrk5" size="2" maxlength="5" value="<?php if (isset($_POST['ap_wrk5'])) echo $_POST['ap_wrk5']; ?>" onKeyup="autotab(this, document.credit.ap_wrk6)" /></td> </tr> </table> <table> <tr><td class="frm"><span class="red">*</span><? formatText3("ap_wrk6","ap_wrk7","ap_wrk8","Phone:"); ?></td></tr> <tr><td><input class="3char" name="ap_wrk6" size="1" maxlength="3" value="<?php if (isset($_POST['ap_wrk6'])) echo $_POST['ap_wrk6']; ?>" onKeyup="autotab(this, document.credit.ap_wrk7)" /> - <input class="3char" name="ap_wrk7" size="1" maxlength="3" value="<?php if (isset($_POST['ap_wrk7'])) echo $_POST['ap_wrk7']; ?>" onKeyup="autotab(this, document.credit.ap_wrk8)" /> - <input class="4char" name="ap_wrk8" size="1" maxlength="4" value="<?php if (isset($_POST['ap_wrk8'])) echo $_POST['ap_wrk8']; ?>" onKeyup="autotab(this, document.credit.ap_wrk9)" /></td></tr> <tr><td class="frm"> Position:</td></tr> <tr><td><input class="input" name="ap_wrk9" size="20" value="<?php if (isset($_POST['ap_wrk9'])) echo $_POST['ap_wrk9']; ?>" /></td></tr> </table> </div> <table> <tr> <td valign="top"> <div class="appSecTitle">Length at current job</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_wrk10","Years:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="10" height="1" /></td> <td class="frm"><? if(moreThen0Years("ap_wrk10")) formatText("ap_wrk10","Months:"); else echo "Months:"; ?></td> </tr> <tr> <td><select name="ap_wrk10"><option value="<?php if (isset($_POST['ap_wrk10'])) echo $_POST['ap_wrk10']; ?>"><?php if (isset($_POST['ap_wrk10'])) echo $_POST['ap_wrk10']; ?></option><? echo $years; ?>'</select></td> <td><select name="ap_wrk11"><option value="<?php if (isset($_POST['ap_wrk11'])) echo $_POST['ap_wrk11']; ?>"><?php if (isset($_POST['ap_wrk11'])) echo $_POST['ap_wrk11']; ?></option>'<? echo $months; ?>'</select></td> </tr> </table> </div> </td> <td><img src="images/spacer.gif" width="30" /></td> <td valign="top"> <div class="appSecTitle">Weekly Income</div> <div class="appSecHldr"> <table> <tr><td class="frm"> <span class="red">*</span><? formatText("ap_wrk12","Gross:"); ?> </td></tr> <tr><td>$ <input class="input" name="ap_wrk12" size="7" maxlength="5" value="<?php if (isset($_POST['ap_wrk12'])) echo $_POST['ap_wrk12']; ?>" /> <a href="javascript:openWin('include/popups/definitions.php?term=GWI','520','200','no','no')"><img src="images/icon_Ques.gif" alt="What does \'Gross Weekly Income\' mean?" /></a></td></tr> </table> </div> </td> </tr> </table> </td> <td><img src="images/spacer.gif" width="30" height="1" /></td> <td class="appHldr_R"> <div class="appTitle">Financial Information</div> <div class="appSecTitle"><span class="red">*</span><? formatText("ap_bnk1","Account Types"); ?></div> <div class="appSecHldr"> <table> <tr> <td class="frm" width="60" align="center">Checking</td> <td class="frm" width="60" align="center">Savings</td> <td class="frm" width="60" align="center">Both</td> <td class="frm" width="60" align="center">None</td> <td> </td> </tr> <tr> <td align="center"><input type="radio" class="radio" name="ap_bnk1" value="Checking" <? if($row['feature_pl'] == 'yes') {echo 'checked';} ?> /></td> <td align="center"><input type="radio" class="radio" name="ap_bnk1" value="Savings" /></td> <td align="center"><input type="radio" class="radio" name="ap_bnk1" value="Checking & Savings" /></td> <td align="center"><input type="radio" class="radio" name="ap_bnk1" value="No bank accounts" /></td> <td align="center"><a href="javascript:openWin('include/popups/definitions.php?term=accounts','520','200','no','no')"><img src="images/icon_Ques.gif" alt="Why do you need to know which type of bank accounts I have?" /></a></td> </tr> </table> </div> <div class="appSecTitle">Previous</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_bnk2","Repossessions:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="20" height="1" /></td> <td class="frm"><span class="red">*</span><? formatText("ap_bnk3","Bankruptcies:"); ?></td> </tr> <tr> <td> <select name="ap_bnk2"> <option value="<?php if (isset($_POST['ap_bnk2'])) echo $_POST['ap_bnk2']; ?>"><?php if (isset($_POST['ap_bnk2'])) echo $_POST['ap_bnk2']; ?></option> <option value="Never">Never</option> <option value="Less than a year ago">Less than a year ago</option> <option value="1 - 3 years">1 - 3 years ago</option> <option value="More than 3 years ago">More than 3 years ago</option> </select> </td> <td> <select name="ap_bnk3"> <option value="<?php if (isset($_POST['ap_bnk3'])) echo $_POST['ap_bnk3']; ?>"><?php if (isset($_POST['ap_bnk3'])) echo $_POST['ap_bnk3']; ?></option> <option value="Never">Never</option> <option value="Pending">Pending</option> <option value="Discharged">Discharged</option> </select> </td> </tr> </table> <table> <tr><td class="frm" colspan="3"><span class="red">*</span><? formatText("ap_bnk5","Have you ever previously financed a vehicle? "); ?><select name="ap_bnk4"><option value="<?php if (isset($_POST['ap_bnk4'])) echo $_POST['ap_bnk4']; ?>"><?php if (isset($_POST['ap_bnk4'])) echo $_POST['ap_bnk4']; ?></option><option value="Yes">Yes</option><option value="No">No</option></select></td></tr> <tr><td class="frm" align="right">Which bank? <input class="input" name="ap_bnk5" size="14" value="<?php if (isset($_POST['ap_bnk5'])) echo $_POST['ap_bnk5']; ?>" /></td></tr> </table> </div> <br /> <div class="appTitle">Vehicle Information</div> <div class="appSecTitle">Is there a specific vehicle that you are interested in?</div> <div class="appSecHldr"> <? echo $vehicle; ?> </div> <div class="appSecTitle">Payment Options</div> <div class="appSecHldr"> <table> <tr> <td class="frm"><span class="red">*</span><? formatText("ap_veh6","Down Payment:"); ?></td> <td rowspan="2"><img src="images/spacer.gif" width="30" height="1" /></td> <td class="frm"><span class="red">*</span><? formatText("ap_veh7","Monthly Payment:"); ?></td> </tr> <tr> <td class="small">$ <input class="input" name="ap_veh6" size="7" maxlength="5" value="<?php if (isset($_POST['ap_veh6'])) echo $_POST['ap_veh6']; ?>" /> <span class="small">(Est.)</span></td> <td> <select name="ap_veh7"> <option value="<?php if (isset($_POST['ap_veh7'])) echo $_POST['ap_veh7']; ?>"><?php if (isset($_POST['ap_veh7'])) echo $_POST['ap_veh7']; ?></option> <option>$200 - $300</option> <option>$350 - $400</option> <option>$400 +</option> </select> <span class="small">(Est.)</span> </td> </tr> </table> </div> <div class="appSecTitle">Special instructions, questions, or comments:</div> <div class="appSecHldr"> <table> <tr><td><textarea name="ap_cmnts" rows="5" cols="60"><?php if (isset($_POST['ap_cmnts'])) echo $_POST['ap_cmnts']; ?></textarea></td></tr> <tr><td class="dots"><img src="images/spacer.gif"></td></tr> </table> </div> <div class="appSecTitle">Legal Disclaimers:</div> <div class="appSecHldr"> <table> <tr><td><? echo $disclaimer; ?></td></tr> <tr><td class="appAcpt"><span class="red">*</span> I have read and accept the terms stated above <input type="checkbox" class="radio" name="agree" value="<?php if (isset($_POST['agree'])) echo $_POST['agree']; ?>" /></td></tr> <tr><td class="appBtn"><input type="image" class="submit" src="images/buttons/submit_off.gif" srcover="images/buttons/submit_on.gif" value="Submit" name="single" /></td></tr> </table> </div> </td> </tr> </table> </div> <? break; } ?> <input type="hidden" name="ip" value="<?php echo $_SERVER['REMOTE_ADDR'];?>"> </form> </td> </tr> </table> <table class="btmIcns"> <tr><td class="btmIcns"><a href="javascript:openWin('include/popups/sendlink.php','350','200','no','yes');" onmouseover="MM_swapImage('email','','images/icon_Email_over.gif',1)" onmouseout="MM_swapImgRestore()"><img src="images/icon_Email_off.gif" name="email" alt="Send page to a friend" /></a></td></tr> </table> <?php include ('include/footer.php'); ?>[code][/code][/code] Quote Link to comment Share on other sites More sharing options...
DBookatay Posted January 25, 2007 Author Share Posted January 25, 2007 FYI: I added [code]$nmF = ucfirst($_POST['ap_nmF']); $nmM = ucfirst($_POST['ap_nmM']); $nmL = ucfirst($_POST['ap_nmL']); $query = "INSERT INTO creditapps (nmF, nmM, nmL, submitted) VALUES ('$nmF', '$nmM', '$nmL', NOW() )"; $result = mysql_query ($query) or trigger_error("Query: $query\n<br />MySQL Error: " . mysql_error()); [/code] on line 93, so I don't really know if it is in the right place or not...Since it doesnt work properly, I assume it is in the wrong spot.Any help would be GREATLY apprechiated! Quote Link to comment Share on other sites More sharing options...
DBookatay Posted January 26, 2007 Author Share Posted January 26, 2007 Anyone? Anyone know where to put the code for inserting the information inth the dB? Quote Link to comment Share on other sites More sharing options...
boo_lolly Posted January 26, 2007 Share Posted January 26, 2007 [quote author=DBookatay link=topic=124048.msg513696#msg513696 date=1169779202]Anyone? Anyone know where to put the code for inserting the information inth the dB?[/quote]that's a LOT of code to rummage through with out any guarantee of payment of some sort. Quote Link to comment 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.