Re: [PHP] _SESSION, _POST, and _GET
David T-G wrote: Yeah. In fact, about half an hour ago I figured that I was spending more time figuring out how to extract in the right order -- or in a limited way -- than I would just doing it right, so I started running through the code looking for any $pw and friends to change :-) When register_globals are on, the order in which variables are extracted are controled by gpc_order setting. G - GET, P - POST, C - COOKIE, later overwrite earlier. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] _SESSION, _POST, and _GET
David T-G wrote: I have successfully used extract() to pull the data out of _SESSION each time; yay. This whole question revolves around the reason you're even extract()ing anything to begin with... Why not just use the $_SESSION, $_POST, etc arrays where you need them. There's no reason to extract(). -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] _SESSION, _POST, and _GET
John, et al -- ...and then John W. Holmes said... % % David T-G wrote: % % I have successfully used extract() to % pull the data out of _SESSION each time; yay. % % This whole question revolves around the reason you're even extract()ing % anything to begin with... Why not just use the $_SESSION, $_POST, etc % arrays where you need them. There's no reason to extract(). OK; fair enough. 1) I was just shown it in a recent thread and it seemed like a lifesaver :-) 2) I want to get our existing code rewritten to be good and not lose stuff, like passwords and email addresses, that it's supposed to remember -- as quickly as possible. I know they're famous last words, but I figure I'll do it right later :-) [Hey, I'm even thinking of a full top-down rewrite anyway!] % % -- % ---John Holmes... % % Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ % % php|architect: The Magazine for PHP Professionals www.phparch.com Thanks TIA HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature
Re: [PHP] _SESSION, _POST, and _GET
David T-G wrote: John, et al -- ...and then John W. Holmes said... % % David T-G wrote: % % I have successfully used extract() to % pull the data out of _SESSION each time; yay. % % This whole question revolves around the reason you're even extract()ing % anything to begin with... Why not just use the $_SESSION, $_POST, etc % arrays where you need them. There's no reason to extract(). OK; fair enough. 1) I was just shown it in a recent thread and it seemed like a lifesaver :-) 2) I want to get our existing code rewritten to be good and not lose stuff, like passwords and email addresses, that it's supposed to remember -- as quickly as possible. I know they're famous last words, but I figure I'll do it right later :-) [Hey, I'm even thinking of a full top-down rewrite anyway!] If you're going to extract blindly from $_POST and $_GET, you might as well just turn register_globals back on; that's what you've basically got. There's absolutely no reason to extract $_XXX['var'] so you can use $var instead of just using $_XXX['var'] wherever you need that value... -- ---John Holmes... Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/ php|architect: The Magazine for PHP Professionals www.phparch.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] _SESSION, _POST, and _GET
John, et al -- ...and then John W. Holmes said... % % David T-G wrote: % % ...and then John W. Holmes said... % % % % This whole question revolves around the reason you're even extract()ing % % anything to begin with... Why not just use the $_SESSION, $_POST, etc % % arrays where you need them. There's no reason to extract(). % % OK; fair enough. 1) I was just shown it in a recent thread and it seemed % like a lifesaver :-) 2) I want to get our existing code rewritten to be % good and not lose stuff, like passwords and email addresses, that it's % supposed to remember -- as quickly as possible. % % I know they're famous last words, but I figure I'll do it right later :-) % [Hey, I'm even thinking of a full top-down rewrite anyway!] % % If you're going to extract blindly from $_POST and $_GET, you might as % well just turn register_globals back on; that's what you've basically got. Urgh. Yeah, I see your point. % % There's absolutely no reason to extract $_XXX['var'] so you can use $var % instead of just using $_XXX['var'] wherever you need that value... Yeah. In fact, about half an hour ago I figured that I was spending more time figuring out how to extract in the right order -- or in a limited way -- than I would just doing it right, so I started running through the code looking for any $pw and friends to change :-) So thanks for the prod; I'm sure it's for the best. % % -- % ---John Holmes... HAND :-D -- David T-G * There is too much animal courage in (play) [EMAIL PROTECTED] * society and not sufficient moral courage. (work) [EMAIL PROTECTED] -- Mary Baker Eddy, Science and Health http://justpickone.org/davidtg/ Shpx gur Pbzzhavpngvbaf Qrprapl Npg! pgp0.pgp Description: PGP signature