You are here: forms value and php echo stops after first space « PHP Programming Language « IT news, forums, messages
forms value and php echo stops after first space

Posted by <edvard on 03/25/06 13:45

The title is maby a bit strage, I had problem coming up with a title
that explain my problem.

I have a variable $myvar="TEST 123"

I would like to use this variable as a default value in a form. I have
tryed this code:

<input name="testbox1" type="text" value=<?php echo "$myvar"; ?>>
the result is a form with a textbox with the default value "TEST"

I have tryed

<input name="testbox2t" type="text" value=<?php echo "TEST 123"; ?>>
Same as before the default value is only "TEST"

But if I try

<input name="testbox 3t" type="text" value= "TEST 123t">
the default value is "TEST 123"

all my test code is inside the <form> </form> statement

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация