That is inbuilt arrays (mean that they are built automatically as part of the language) and there are lots of them like
$_GET, $_POST, $_SESSION, $_SERVER (that holds information about the server the script is running on).
Let us say an element in the associative array is:
WEBBROWSER (it is an example and not necessarily correct) and stored in the $_SERVER array, you get that information like this:
$webbrowser = $_SERVER['WEBBROWSER']
Another example: Another element is PHP_SELF (the URL of the active page and that is correct).
$thisurl = $_SERVER['PHP_SELF']
I have reccomended
"The PHP Anthology: Object Oriented PHP Solutions" a lot of times here at WPW.
The first chapter of volume II is about authentication. You can download the frist chapters of volume I free and some chapters from volume II free. Hopefully it is the first chapter of volume II. There you have an exact example of what you are requiring.
Variable:
$redirect = URL you want to redirect to:
Method:
function redirect($from=true) {
if ( $from ) {
header ( 'Location: '.$this->redirect.'?from='.
$_SERVER['REQUEST_URI'] );
} else {
header ( 'Location: '.$this->redirect );
}
exit();
}