a URL ending with something like portal.php?key2=hello how can I get the value of \"key2\"?
portal.php?key2=hello
$_GET['key2']
will get you the value from a query string.
$_POST['key2']
will get you the value from a form posted.
$_REQUEST['key2']
will get you either of the above if it exists.