If you're truly against $_REQUEST then as stated before using $_SERVER['REQUEST_METHOD'] would be another good option though you should know where your data is coming from, if you have to look for it something's wrong
Choosing between $_POST & $_GET and not returning Notice
Moderator: General Moderators
Personally I always try to use $_POST or $_GET whenever possible, but I do often times use $_REQUEST. There's really no problem with using it as long as you verify the data, as you should do with $_POST and $_GET. Always verify external data, that's like the first rule of security with PHP. So whether you use $_POST, $_GET, or $_REQUEST should not matter unless you're using cookies in which case things could get messy.
If you're truly against $_REQUEST then as stated before using $_SERVER['REQUEST_METHOD'] would be another good option though you should know where your data is coming from, if you have to look for it something's wrong
If you're truly against $_REQUEST then as stated before using $_SERVER['REQUEST_METHOD'] would be another good option though you should know where your data is coming from, if you have to look for it something's wrong