Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

displaying php variables in a html text box

Status
Not open for further replies.

fylnc

Technical User
Apr 24, 2002
15
GB
when i display the string content of a PHP variable (that contains spaces) in a html text box the text is cut off at the first space character...

ie...
the variable ="hello there"

when displayed in the HTML text box all i get is "hello"

what is going on???

cheers FYL
 
Make sure you put quotes in the
Code:
VALUE
part of your html, ie
Code:
echo &quot;<INPUT TYPE=\&quot;text\&quot; NAME=\&quot;myvar\&quot; VALUE=
Code:
\&quot;
Code:
&quot;.$myvar.&quot;
Code:
\&quot;
Code:
>&quot;;

-Rob
 
Rob...
It works....

nice one....


FYL

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top