ballhogjoni Posted April 7, 2007 Share Posted April 7, 2007 My db is only collecting part of the STREET1 variable. This is the form code when they submit the STREET1 info. Basically my mysql db is only collecting the number portion of input. ex. 101 test st. the database only collects the "101" and leaves out the "test st." part <form name=form1 action="<?php echo('dcc_confirm.php'); ?>" method="post"> <input type="hidden" value="<?php echo($_SESSION['total']); ?>" name="OrderTotal"> <input type="hidden" value="<?php echo($_SESSION['buyer_email']); ?>" name="BuyerEmail"> <input type="hidden" value="<?php echo($_SESSION['invoice_id']); ?>" name="InvoiceID"> <input type="hidden" value=<?php echo($_SESSION['ReqConfirmedShipping']); ?> name="ReqConfirmedShipping"> <input type="hidden" value=<?php echo($_SESSION['NoShipping']); ?> name="NoShipping"> <div id=title> <div id=title_header>Billing Information</div> <div id=title_instructions>Please complete payment info below and click continue.</div> </div> <img alt=" Visa" src="<?php echo($image_dir . 'logo_ccVisa.gif'); ?>" border="0"> <img alt=" Mastercard" src="<?php echo($image_dir . 'logo_ccMC.gif'); ?>" border="0"> <img alt=" Discover" src="<?php echo($image_dir . 'logo_ccDiscover.gif'); ?>" border="0"> <img alt=" American Express" src="<?php echo($image_dir . 'logo_ccAmex.gif'); ?>" border="0"><br> <div id=cc_info> <div id=cc_info_header> Credit or Debit Card Information</div> <div id=cc_info_body> <input type="hidden" value="<?php echo($PaymentAction /*variable from price_list.php*/); ?>" name="PaymentAction"> <input type="hidden" value="<?php echo($_SESSION['subtotal']); ?>" name="ItemTotal"> <input type="hidden" value="<?php echo($_SESSION['tax']); ?>" name="TaxTotal"> <input type="hidden" value="<?php echo($_SESSION['desc']); ?>" name="OrderDescription"> <select name="CreditCardType"> <option value="Visa">Visa</option> <option value="MasterCard">MasterCard</option> <option value="Discover">Discover</option> <option value="Amex">American Express</option> </select><input type="hidden" name="r_CreditCardType" value="Please enter your Credit Card Type"><br /> Credit Card Number<input name="CreditCardNumber" value="4983599115150124" autocomplete=off size="20"> <input type="hidden" name="r_CreditCardNumber" value="Please enter your Credit Card Number"><br /> Security Code<input name="CVV2" value="000" autocomplete=off size="5">(last 3 digit # on back of card) <input type="hidden" name="r_CVV2" value="Please enter your CVV2 Code"><br> <select name="ExpMonth"> <option value="1">01</option> <option value="2">02</option> <option value="3">03</option> <option value="4">04</option> <option value="5">05</option> <option value="6">06</option> <option value="7">07</option> <option value="8">08</option> <option value="9">09</option> <option value="10">10</option> <option value="11">11</option> <option value="12">12</option> </select><input type="hidden" name="r_ExpMonth" value="Please enter your Expiration Month"> <select name="ExpYear"> <option value="2007">2007</option> <option value="2008">2008</option> <option value="2009">2009</option> <option value="2010">2010</option> <option value="2011">2011</option> <option value="2012">2012</option> <option value="2013">2013</option> <option value="2014">2014</option> <option value="2015">2015</option> </select><input type="hidden" name="r_ExpYear" value="Please enter your Expiration Year"><br /> <input type="hidden" name="CouponCode" size="20"> <input type="hidden" name="GiftCertificate" size="20"> First Name<input name="FIRSTNAME" size="20" value="<?php echo($_SESSION['first']);?>"> <input type="hidden" name="r_FIRSTNAME" value="Please enter your first name"><br /> Last Name<input name="LASTNAME" size="20" value="<?php echo($_SESSION['last']);?>"> <input type="hidden" name="r_LASTNAME" value="Please enter your last name"><br /> Billing Address<input name="STREET1" size="20"> <input type="hidden" name="r_STREET1" value="Please enter your Billing Address"><br /> Billing Adress 2<input name="STREET2" size="20"><br /> City<input name="CITYNAME" size="20"> <input type="hidden" name="r_CITYNAME" value="Please enter your CITY NAME"><br /> State<select name="STATEORPROVINCE"> <option value=""></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><input type="hidden" name="r_STATEORPROVINCE" value="Please enter your STATE OR PROVINCE"><br /> Zip Code<input name="POSTALCODE" maxlength="5" size="10"> <input type="hidden" name="r_POSTALCODE" value="Please enter your Zip Code"><br /> Country<select name="COUNTRY"> <option value="US" selected>United States</option> </select> <input type="hidden" name="r_COUNTRY" value="Please enter your Country"><br /> Phone Number<input name="PHONE" size="20" maxlength="12"> <input type="hidden" name="r_PHONE" value="Please enter your Phone Number"><br /> Email Address<input value="<?php echo($_SESSION['buyer_email']); ?>" name="PAYER" size="20"> <input type="hidden" name="r_PAYER" value="Please enter your Email Address"><br /> <input type="hidden" value="<?php echo($REMOTE_ADDR); ?>" name="IPAddress"> <input type="button" name="Submit" value=" Confirm Your Information " onClick="check(form,form.elements.length)"> </div> </form> code after they submit the form <?php session_start(); require_once("config.php"); require_once("price_list.php"); $_SESSION['BuyerEmail'] = $_POST['BuyerEmail']; $_SESSION['ExpYear'] = $_POST['ExpYear']; $_SESSION['ExpMonth'] = $_POST['ExpMonth']; $_SESSION['CreditCardType'] = $_POST['CreditCardType']; $_SESSION['CreditCardNumber'] = $_POST['CreditCardNumber']; $_SESSION['CVV2'] = $_POST['CVV2']; $_SESSION['FIRSTNAME'] = $_POST['FIRSTNAME']; $_SESSION['LASTNAME'] = $_POST['LASTNAME']; $_SESSION['STREET1'] = $_POST['STREET1']; $_SESSION['STREET2'] = $_POST['STREET2']; $_SESSION['CITYNAME'] = $_POST['CITYNAME']; $_SESSION['STATEORPROVINCE'] = $_POST['STATEORPROVINCE']; $_SESSION['POSTALCODE'] = $_POST['POSTALCODE']; $_SESSION['COUNTRY'] = $_POST['COUNTRY']; $_SESSION['PHONE'] = $_POST['PHONE']; $_SESSION['PAYER'] = $_POST['PAYER']; $_SESSION['IPAddress'] = $_POST['IPAddress']; $Status = "1"; if (!empty($_SESSION['STREET1']) && !empty($_SESSION['CITYNAME'])) { mysql_connect($db_server,$db_user,$db_password); @mysql_select_db($db_name) or die( "Unable to select database"); $query = "INSERT INTO address VALUES ('','".$_POST['FIRSTNAME']."','".$_POST['LASTNAME']."','".$_POST['STREET1']."','".$_POST['STREET2']."','".$_POST['CITYNAME']."','".$_POST['STATEORPROVINCE']."','".$_POST['POSTALCODE']."','".$_POST['COUNTRY']."','".$_POST['PHONE']."','".$_POST['PAYER']."','".$_POST['IPAddress']."','$Status')"; mysql_query($query); mysql_close(); Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/ Share on other sites More sharing options...
redking Posted April 7, 2007 Share Posted April 7, 2007 is the STREET1 column in the database set to varchar? Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223728 Share on other sites More sharing options...
ballhogjoni Posted April 7, 2007 Author Share Posted April 7, 2007 yes Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223729 Share on other sites More sharing options...
redking Posted April 7, 2007 Share Posted April 7, 2007 Did you try echoing $_POST['STREET1']? if so, did it have the correct value? Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223732 Share on other sites More sharing options...
ballhogjoni Posted April 7, 2007 Author Share Posted April 7, 2007 hmm its not keeping it value... what should i do? Its just echoing 101 not the whole value. Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223738 Share on other sites More sharing options...
ballhogjoni Posted April 7, 2007 Author Share Posted April 7, 2007 anybody? Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223755 Share on other sites More sharing options...
ballhogjoni Posted April 7, 2007 Author Share Posted April 7, 2007 anybody know this? Link to comment https://forums.phpfreaks.com/topic/46052-why-is-my-db-not-collecting-all-of-the-info/#findComment-223805 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.