note 15583 deleted from language.variables.predefined by jimw
| From: | jimw@php.net | Date: | Fri, 14 Dec 2001 19:26:29 +0000 |
| Subject: | note 15583 deleted from language.variables.predefined by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22657@lists.php.net to get a copy of this message | ||
Thanks to daniel@chicayban I was able to get my login redirect working. The script allows you to be
redirected to the page you wanted after a successful login.
The first bit checks to see if the login cookie is set. If it's not you get redirected using
this bit of PHP. Then once you've logged in correctly you get redirected to $page (as passed).
If page isn't set you're sent to the front page.
while(list($key, $val) = each($HTTP_GET_VARS)) {
$attributes = $attributes . "$key=$val%26";
}
$page = $PHP_SELF . "%3F" . $attributes;
header ("Location: /admin/login.php?page=$page");
%26 is &
%3F is ?
G'luck and thanks. :)