matthewst Posted May 29, 2007 Share Posted May 29, 2007 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" Link to comment https://forums.phpfreaks.com/topic/53448-solved-automatically-populating-fields-is-not-displaying-all-field-data/ Share on other sites More sharing options...
eric1235711 Posted May 29, 2007 Share Posted May 29, 2007 <input type="text" class="formTextbox" name="rest_address_1" size="24" value="<?="$rest_address_1"?>"></td> you didn't put the quotes in value property of your input Link to comment https://forums.phpfreaks.com/topic/53448-solved-automatically-populating-fields-is-not-displaying-all-field-data/#findComment-264118 Share on other sites More sharing options...
matthewst Posted May 29, 2007 Author Share Posted May 29, 2007 thanks man Link to comment https://forums.phpfreaks.com/topic/53448-solved-automatically-populating-fields-is-not-displaying-all-field-data/#findComment-264128 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.