[PHP] Globals problem - $_REQUEST good solution?
Hi, I am getting some variable from another program an the main problem is its coming mixed... eg: some get and some post So far I have coded this with register globals on because I didnt know which way it was coming.. now i want to do it with globals off... After going through the manual trying to find an answer I came accross $_REQUEST, is this a good solution? because I have never used this before or is this as bad as having globals on? Thanks, -Ryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Globals problem - $_REQUEST good solution?
From: Ryan A [EMAIL PROTECTED] After going through the manual trying to find an answer I came accross $_REQUEST, is this a good solution? because I have never used this before or is this as bad as having globals on? The only simularity it has to register_globals ON is that you don't know what method provided the value. It could be POST, GET, or COOKIE. But... if you're validating the data properly anyhow, it really shouldn't matter where it's coming from. I use $_REQUEST for everything, that way I can change the method of my forms if I need to without affecting my code (or the user can). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Globals problem - $_REQUEST good solution?
Cool. Thanks John. -Ryan The only simularity it has to register_globals ON is that you don't know what method provided the value. It could be POST, GET, or COOKIE. But... if you're validating the data properly anyhow, it really shouldn't matter where it's coming from. I use $_REQUEST for everything, that way I can change the method of my forms if I need to without affecting my code (or the user can). ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php