Welcome to WebmasterWorld Guest from 22.214.171.124
I'm filling a form from a MySQL table using PHP. Everyone is fine except for the instances where the field has a space (eg. the address).
If the value on the table is :
1 Main Street
all I get in the form field is :
the code I'm using is:
<input type=Text name=address1 SIZE=30 VALUE=$myrow[address1]>
nothing unusual there is there ?
I hope somebody can help 'cos there's much scratching of heads here :)
<input type=Text name=address1 SIZE=30 VALUE=1 Main Street>
The browser only sees the '1' as the value - the spaces make it look to the browser as if Main and Street are extra attributes to the input tag, and as it doesn't recognise them, it just ignores them :)
Changing the code to:
<input type=Text name=address1 SIZE=30 VALUE="$myrow[address1]">
will result in
<input type=Text name=address1 SIZE=30 VALUE="1 Main Street">
being generated, and all will be well...