Re: $_POST and multiple windows

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Saturday 20 November 2004 21:02, Rory McKinley wrote:

> My question is about the $_POST superglobal. I assume that there will be
> only one instance of this superglobal per session and not per open
> window 

You would in fact get a version of $_POST for *each* _request_. Request 
meaning each time a form is submitted.

> (i.e. if I have three windows open, each running a different 
> module within the same app independent of one another, there is only a
> single structure for storing their post data).

PHP has no notion of what your application consists of. When you submit a form 
PHP has no idea whether it came from window1 or window2 or wherever.

> Hence, if I have fields 
> in multiple windows that have a common name (e.g. I have two modules,
> each of which requires a field called client name) posts from different
> windows will overwrite the last post of a field with that common name,
> regardless which window it came from.

Even if you submit the same form twice in rapid succession nothing will get 
overwritten. Each request (submission) starts a new instance of php with it 
own copy of the form data.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
------------------------------------------
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
------------------------------------------
/*
What about WRITING it first and rationalizing it afterwords?  :-)
             -- Larry Wall in <8162@xxxxxxxxxxxxxxxxxxxxxxx>
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux