-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
Hello List
Currently I am building an app that will have a navigation app that will allow users to open multiple windows (every time they click on a link it will open a new window) while the navigation window remains unchanged (for the purpose of this question).
Therefore it will be possible for the user to work on more than one item ~ of functionality at the same time (e.g. he can have one window that he is using to update client details and another that he uses to query product details). All the persistent info is shared in session variables and the session is cookies-based.
One of these session variables is an object that stores all login, and user-permission related data. This object is accessed by each window that is opened from the app control panel. Most of the windows will rely on $_POST data which will be used for input to a DB.
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 (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). 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.
E.g. doc1.php has a field called client_name User enters "client1" and hits submit. $_POST['client_name'] = "client1" doc2.php also has a field called client_name User enters "client2" and hits submit. $_POST['client_name'] = "client2"
And now (finally) my question:
Let us assume that in the above example, I renamed the field names so that they weren't common :
doc1.php has a field called client_name1 doc2.php has a field called client_name2
When the submit button is hit in doc1.php the action page is doc1next.php When the submit button is hit in doc2.php the action page is doc2next.php
In my scenario the user first clicks submit on doc1.php and then clicks submit on doc2.php before doc1next.php is finished (i.e it still needs to access the values posted from doc1next.php).
Will $_POST still contain both client_name1 and client_name2 or will the $_POST array be emptied when submit is clicked in doc2.php - meaning that the only field available is client_name2.
I have a sneaking suspicion that it is the latter but I am hoping that someone will be able to tel me definitively.
Apologies for the looong email - I just wanted to make sure that my problem was properly defined.
- -- Rory McKinley Nebula Solutions +27 21 555 3227 - office +27 21 551 0676 - fax +27 82 857 2391 - mobile www.nebula.co.za ==================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.5 (MingW32)
iD8DBQFBn0BwpslJtahJIvMRArUnAKDavfdYBIYTpzxCPZJAKsM4gI4shACfX63M ay1ZEuEa20c3eKSKkonSdFw= =N6A5 -----END PGP SIGNATURE-----
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php