URL: http://stackcomplete.com?message=143
need to capture message
variable value in PHP, i was confused which one is best $_GET
or $_REQUEST
-
$_GET['message']
or
$_REQUEST['message']
URL: http://stackcomplete.com?message=143
need to capture message
variable value in PHP, i was confused which one is best $_GET
or $_REQUEST
$_GET['message']
or
$_REQUEST['message']
Go with $_GET
$_REQUEST
holds an associative array that by default contains the contents of $_GET
, $_POST
and $_COOKIE
.
Since you know that the parameter will be URL based. $_GET
will suffice.