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 John McClumpha on 10/10/42 11:32

On Sat, 19 Nov 2005 05:11:32 +0100, "Stefan Mueller"
<seekware-remove-@yahoo.com> wrote:

>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; ?>">

that should do the trick ;)

>PS: To transfer e.g. the value of the PHP variable $MyValue to a JavaScript
>variable I need to write $MyValue to a hidden input box with PHP and read it
>later with a JavaScript. Correct? Or is there a direct way (JavaScript
>variable = PHP variable)?

you can use a similar technique to that above... e.g. (within a
javascript)

$MyJSVariable = <?echo $MyPHPVariable; ?>


hope this helps

--
John McClumpha
Darkness Reigns - http://www.incitegraphics.com.au/darkness/

 

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

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