You are here: Re: can I pass PHP var to JS ...? « All PHP « IT news, forums, messages
Re: can I pass PHP var to JS ...?

Posted by Rik on 03/06/07 05:48

Tamarin <tar@tam.com> wrote:

> Hello,
>
> new @ php and was wondering if I can pass on a PHP variable to Javascr=
ipt
> for returning an IP number in a form. I use a PHP snippet below to =

> advise
> potential members of a forum that their IP is being recorded (as all
> web-servers are capable of), but I am wondering if there is some way t=
o =

> pass
> the PHP variable to a hidden form-field variable that would return the=
IP
> number via the form processor?

echo '<input type=3D"hidden" name=3D"ip" value=3D"'.$_SERVER{'REMOTE_ADD=
R'].'">';

Then again, that seems highly unreliable, what problem are you trying to=
=

solve with this hidden form field?

-- =

Rik Wasmus
Posted on Usenet: any site claiming this as original content or me as an=
=

contributing member is stealing content.
Ask Smart Questions: http://tinyurl.com/anel

 

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

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