You are here: Re: How to add some text to an input box with PHP « All PHP « IT news, forums, messages
Re: How to add some text to an input box with PHP

Posted by Stefan Mueller on 10/10/73 11:32

>>I've an input box like
>> <input type = "hidden" name = "MyBox" value = "">
>>
>>Now I'd like to add some text to this input box with PHP.
>>How can I do that?
>
> <input type = "hidden" name = "MyBox" value = "<? echo $MyValue; ?>">

Actually I'm looking for a solution to add some text to an input box which
already exists.
In JavaScript I do it with
document.MyForm.MyBox.value = "some text";

But how can I do that within PHP?

Stefan


PS: To transfer the content of a PHP variable to a JavaScript variable with
$MyJSVariable = <?echo $MyPHPVariable; ?>
doesn't work. Mozilla Firefox's JavaScript Console says syntax error at '<?'
I've to do that within JavaScript. Correct? I'm a little bit surprised why
your JavaScript variable has a '$' at the beginning.

 

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

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