Jump to content

[SOLVED] Automatically populating fields is not displaying all field data


matthewst

Recommended Posts

I am auto-populating fields in my form like this:

 

<?php
$query="SELECT * FROM abc_tables WHERE table_id=$table_id";
$result=mysql_query($query);
while ($row = mysql_fetch_assoc($result))
{
$rest_name = $row['rest_name'];
$contact_fname = $row['contact_fname'];
$contact_lname = $row['contact_lname'];
$rest_address_1 = $row['rest_address_1'];
$rest_address_2 = $row['rest_address_2'];
$rest_city = $row['rest_city'];
$rest_state_pr = $row['rest_state_pr'];
}
?
///////
<td>Contact First Name</td>
<td>
<input type="text" class="formTextbox" name="rest_address_1" size="24" value=<?="$rest_address_1"?>></td>
<td width="40"></td>

 

The problem is only the first part of the data is being displayed.

Example:

the restaurant address should be "1313 mocking bird lane"

but the field only displays "1313"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.