$_REQUEST

Hello,

Does: $REQUEST[’_____’] have the same basic function as $POST[’_____’] and or $GET[’_____’] ?

If not, what does $_REQUEST specifically do?

If all three listed above are basically the same, what are the differences?

I’ve been searching $_REQUEST but can’t seem to find threads that expound on it.

Thanks in advance.
Chris

POST and GET are both types of HTTP requests. Yes, the $_REQUEST variable contains both $_POST and $_GET elements. The use of this is frequently frowned upon for many usages however, due to security issues (if you use $_REQUEST to get information from a form which you’ve set to use the POST method, someone could just add all the information as GET parameters and your code would still work and take their values).

More in-depth info at the PHP manual page for REQUEST

Thanks, Smokey!

Great info about the security issue.

Much appreciated.

Chris

Sponsor our Newsletter | Privacy Policy | Terms of Service