Home > Archive > PHP Language > January 2006 > Text in HTML form only displays first word
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Text in HTML form only displays first word
|
|
|
| Using PHP & MYSQL, a variable is saved to a row and then fetched
again. This process runs ok. But when displaying a text variable in an
HTML form within an input='text' box, only the first word is
displayed. For example if the variable $description was to contain
'Red square box' onlyh the word 'Red' would appear in the HTML form
text box.
When this text box is saved to a variable, there is also only one word
in it. I've check the contents of the variable being placed into the
box and it's always correct. I've also tried setting the 'Size' and
'maxlength' variables in the HTML text box parameters, but to no
avail. This happens in both ie 5.5 & Firefox 1.07.
I realise that something very simple must be amiss, but I just cant
work it out.
Any assitance would be greatly appreciated.
Thanks
Pete...
| |
|
| On Thu, 19 Jan 2006 17:42:25 GMT, Andy Hawkins <andy@gently.org.uk>
wrote:
>Hi,
>
>In article <0livs19atd9s0metmmkmhqg3l7qi4098ac@4ax.com>,
> pete<noname@nowhere.com> wrote:
>
>You are quoting the value in the generated HTML aren't you?
>
><input name="fred" value="a value with spaces in it">
>
>If you don't put quotes around the value, I expect it'll only include the
>first word.
>
>Andy
....That'll be it then!
I knew it was something really obvious, but just couldnt see the wood
for the trees!
Thanks for your help - hope I can return the favour someday.
Pete...
|
|
|
|
|