Monday, November 21, 2011

PHP: $_REQUEST or $_POST or $_GET?





If you are very sure of the return string type, use $_POST['myStringKey'] for POST data and $_GET['myStringKey'] for GET data.

If you are not really sure (ex. it's from a third party source such as Facebook), use $_REQUEST['myStringKey'].




No comments:

Post a Comment