Jump to content

[SOLVED] Data into a form


sseeley

Recommended Posts

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

Link to comment
https://forums.phpfreaks.com/topic/169511-solved-data-into-a-form/
Share on other sites

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.'" />';

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.