Hello forums !!
I am curious about some questions.
what happens when the session name and the $_POST vars or $_GET vars names are same.
ie
Thanks in advance to all of you.PHP Code:$_SESSION['sess_name'] = "xyz";
$_GET['sess_name'] = "abc" ;
| SitePoint Sponsor |
Hello forums !!
I am curious about some questions.
what happens when the session name and the $_POST vars or $_GET vars names are same.
ie
Thanks in advance to all of you.PHP Code:$_SESSION['sess_name'] = "xyz";
$_GET['sess_name'] = "abc" ;

Nothing special, if you have register_globals off (which you should).
A horror show if you have it turned on.
You used to be able to determine the order variables would be set with variables_order (can you still?). So if it was set to "EGPCS" (which I believe was the default), then ENV, GET, POST, COOKIE and SERVER get set in that order (which is the most logical, to make sure SERVER variables aren't overridden by GET or POST).
Advertise on Glowfoto
banners as low as $25/month, text ads $10/month
Share 10 million impressions per month!
Bookmarks