sseeley Posted August 9, 2009 Share Posted August 9, 2009 Hi I am trying to display data in a form. I am recieving the data correctly from the database for example. 'Mr Peter Griffiths' However in the text field it is only shoing 'Mr' and ignoring everything after the space. Can anyone give me any advice as to how to display this data? Many thanks in advance. Stuart Quote Link to comment https://forums.phpfreaks.com/topic/169511-solved-data-into-a-form/ Share on other sites More sharing options...
smerny Posted August 9, 2009 Share Posted August 9, 2009 can you show that portion of code? Quote Link to comment https://forums.phpfreaks.com/topic/169511-solved-data-into-a-form/#findComment-894369 Share on other sites More sharing options...
wildteen88 Posted August 9, 2009 Share Posted August 9, 2009 You need to make sure your wrap your attribute values in quotes, eg echo "<input type=\"input\" name=\"some name\" value=\"".$var_to_populate_field."\" />"; Or even echo '<input type="input" name="some name" value="'.$var_to_populate_field.'" />'; Quote Link to comment https://forums.phpfreaks.com/topic/169511-solved-data-into-a-form/#findComment-894373 Share on other sites More sharing options...
sseeley Posted August 9, 2009 Author Share Posted August 9, 2009 Many thanks Quote Link to comment https://forums.phpfreaks.com/topic/169511-solved-data-into-a-form/#findComment-894375 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.