You are here: Re: Scope of php variables outside <?php ?> blocks « PHP Programming Language « IT news, forums, messages
Re: Scope of php variables outside <?php ?> blocks

Posted by shawn.ready on 08/22/06 01:13

Hi Jerry

The page gets loaded once (am only loading it once during testing),
then the php gets called on the load, now once it is loaded, the
javascript UpdateMyMap() is called on the clients side repeatedly.

First time in it has

$pidpoint contains "unique_String_1234", this is then overwitten with a
difference value within the scope of this function, say it now stores
"unique_String_5678". But, when the client calls the UpdateMyMap()
again, $pidpoint contains "unique_String_1234" again. Thats not what I
wanted, I need it to store the value I set it in the
$pidpoint=$pidpointNext;

Shawn

Jerry Stuckle wrote:
>
> Sure it will. All of your PHP code will be executed on the server, then
> the page is sent to the client, where your javascript is executed. When
> the page is resubmitted, all of your PHP code will be executed on the
> server again, and the page is sent to the browser, where your javascript
> is executed.
>
> And so on.
>
> Each time you load the page you start fresh.
>
> --
> ==================
> Remove the "x" from my email address
> Jerry Stuckle
> JDS Computer Training Corp.
> jstucklex@attglobal.net
> ==================

 

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

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