Reply to Re: How to share/use a variable between PHP and HTML on the same page ?

Your name:

Reply:


Posted by AndreHebben on 11/19/07 08:19

On Nov 19, 8:40 am, pradnya <pdu...@gmail.com> wrote:
> How to share/use a variable between PHP and HTML on the same page ?
> ( i.e. without using GET/ POST etc.... )
>
> Is it possible ?
>
> And what about same with PHP and JavaScript ?

You can share through from PHP to HTML just one way (server->client)
through a hidden input field
Example:
<INPUT TYPE="hidden" NAME="htmlvar" value=<?php echo $phpvar ?> />
For Javascript it is then possible to access it.

For two way communication you should really look into AJAX/ JSON
principles

[Back to original 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

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