note 15583 added to language.variables.predefined

From: Date: Tue, 18 Sep 2001 15:46:35 +0000
Subject: note 15583 added to language.variables.predefined
Groups: php.notes 
Request: Send a blank email to php-notes+get-18135@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. :) http://www.php.net/manual/en/language.variables.predefined.php

« previous php.notes (#18135) next »