PDA

View Full Version : value=databasefield not pulling data



awayne96
10-26-2009, 10:27 AM
I have spend hours trying to figure out what is up.... heck its almost 5:30 est when I'm posting this lol. I copied the code from another part of the site where it works perfectly and then just changed the first part of the database fields to the right names. When I pull up the form, it is not pulling the data from the table on "most" of the fields. Here is some code and not that phone 3 DOES pull the data and so does country but all the other ones the field names are in the text box (example: ship_contact_terminal) This is the one thing that needs done and I am pretty much ready to launch my site with what I have:




<table border=1 width=100% cellpadding=0 cellspacing=0 bgcolor="#8dd822" align="center" >

<td valign=middle>
<font color=black size=2>This is a Terminal

</td>
<td valign=top>
<select name=ship_contact_terminal>
<option>%%ship_contact_terminal%%</option>
<option></option>
<option>Yes</option>
<option>No</option>
</select>
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2>Terminal, Dealer, Auction (if any)

</td>
<td valign=top>
<input type=text size=20 name=ship_terminal_dealer value="%%ship_terminal_dealer%%">
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2><b>Pick up contact</b> (Company or Individual Name being picked up from)

</td>
<td valign=top>
<input type=text size=20 name=ship_pickup_contact value="%%ship_pickup_contact%%">
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2>Buyer Number

</td>
<td valign=top>
<input type=text size=20 name=ship_buy_num value="%%ship_buy_num%%">
</td>
</tr>

<tr>
<td valign=top>
<font color=black size=2><b>Address</b>

</td>
<td valign=top>
<textarea wrap=virtual cols=40 rows=6 name=ship_orig_address value="%%ship_orig_address%%">%%ship_orig_address%%</textarea>
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2><b>Origination City</b>

</td>
<td valign=top>
<input type=text size=20 name=ship_orig_city value="%%ship_orig_city%%">
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2><b>Origination State</b>

</td>
<td valign=top>
<select name=ship_orig_state>
<option>%%ship_orig_state%% </option>
<option></option>
<option>Alabama</option>
<option>Alaska</option>
<option>Arizona</option>
<option>Arkansas</option>
<option>California</option>
<option>Colorado</option>
<option>Connecticut</option>
<option>District of Columbia</option>
<option>Delaware</option>
<option>Florida</option>
<option>Georgia</option>
<option>Hawaii</option>
<option>Idaho</option>
<option>Illinois</option>
<option>Indiana</option>
<option>Iowa</option>
<option>Kansas</option>
<option>Kentucky</option>
<option>Louisiana</option>
<option>Maine</option>
<option>Maryland</option>
<option>Massachusetts</option>
<option>Michigan</option>
<option>Minnesota</option>
<option>Mississippi</option>
<option>Missouri</option>
<option>Montana</option>
<option>Nebraska</option>
<option>Nevada</option>
<option>New Hampshire</option>
<option>New Jersey</option>
<option>New Mexico</option>
<option>New York</option>
<option>North Carolina</option>
<option>North Dakota</option>
<option>Ohio</option>
<option>Oklahoma</option>
<option>Oregon</option>
<option>Pennsylvania</option>
<option>Rhode Island</option>
<option>South Carolina</option>
<option>South Dakota</option>
<option>Tennessee</option>
<option>Texas</option>
<option>Utah</option>
<option>Vermont</option>
<option>Virginia</option>
<option>Washington</option>
<option>West Virginia</option>
<option>Wisconsin</option>
<option>Wyoming</option>
<option>Alberta</option>
<option>British Columbia</option>
<option>Manitoba</option>
<option>New Brunswick</option>
<option>Newfoundland</option>
<option>Northwest Territories</option>
<option>Nova Scotia</option>
<option>Nunavut</option>
<option>Ontario</option>
<option>Prince Edward Island</option>
<option>Quebec</option>
<option>Saskatchewan</option>
<option>Yukon</option>
</select>
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2><b>Origination Zip Code</b>

</td>
<td valign=top>
<input type=text size=15 name=ship_orig_zip value=%%ship_orig_zip%%>
</td>
</tr>

<tr>
<td valign=middle>
<font size=2 color=black><b>Country</b>

</td>
<td valign=top>
<select name=ship_country>
<option>%%ship_country%%</option>
<option>United States of America</option>
<option>Canada</option>
</td>
</tr>


<tr>
<td valign=middle>
<font color=black size=2>Origination Phone 1
</td>
<td valign=top>
<input type=text size=15 name=ship_orig_phone1 value="%%ship_orig_phone1%%" >
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2>Origination Phone 2

</td>
<td valign=top>
<input type=text value="%%ship_orig_phone2%%" size=15 name=ship_orig_phone2>
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2>Origination Phone 3

</td>
<td valign=top>
<input type=text size=15 name=ship_orig_phone3 value="%%ship_orig_phone3%%">
</td>
</tr>

<tr>
<td valign=middle>
<font color=black size=2>Origination Cell Phone

</td>
<td valign=top>
<input type=text size=20 name=ship_orig_cell value="%%ship_orig_cell%%">
</td>
</tr>
</table>

technica
10-26-2009, 10:40 AM
where is the code that is pulling the data from the database?

awayne96
10-26-2009, 03:50 PM
I use value= to pull the data. This code above is copied from another page exactly and works perfectly on the other page. And also like I said, it does pull a few values but not all of them on this page. What else are you looking for me to post code wise?

FishMonger
10-26-2009, 03:54 PM
What else are you looking for me to post code wise?
The Perl code.

awayne96
11-16-2009, 11:26 PM
Just a followup.

I ended up redoing the tabe in the database and all is well. There was something in the database that was corrupt that was causing the issue.