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" Quote Link to comment 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 Quote Link to comment Share on other sites More sharing options...
matthewst Posted May 29, 2007 Author Share Posted May 29, 2007 thanks man 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.