This is a discussion on PHP using php var in html within the PHP Language forums, part of the PHP Programming Forums category; Please help! What is going wrong? $mystring= "part1 part2 part3" // remark the spaces! ..... <td > <input ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Please help!
What is going wrong? $mystring= "part1 part2 part3" // remark the spaces! ..... <td > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> </td> ....... the text field will only show "part1" and not the rest of the string! |
|
|||
|
*** Freak wrote/escribió (Wed, 06 Oct 2004 14:35:35 GMT):
> $mystring= "part1 part2 part3" // remark the spaces! > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> As any basic HTML manual will tell you, you need to use quotes to surround the value of attributes. It's recommended when there aren't spaces, and compulsory when there are. ;-) -- -- Álvaro G. Vicario - Burgos, Spain -- Thank you for not e-mailing me your questions -- |
|
|||
|
Thanks
"Alvaro G Vicario" <alvaro_QUITAR_REMOVE@telecomputeronline.com> wrote in message news:1ojp5hfnxfqe6.sxrxxbqwspwb.dlg@40tude.net... > *** Freak wrote/escribió (Wed, 06 Oct 2004 14:35:35 GMT): > > $mystring= "part1 part2 part3" // remark the spaces! > > <input type="text" name="test" size="50" value=<?echo ($mystring);?>> > > As any basic HTML manual will tell you, you need to use quotes to surround > the value of attributes. It's recommended when there aren't spaces, and > compulsory when there are. ;-) > > > -- > -- Álvaro G. Vicario - Burgos, Spain > -- Thank you for not e-mailing me your questions > -- |