Need help with redirecting to admin login page or user log p
Posted: Wed May 18, 2005 12:34 pm
Help! Newbie here...
I'm trying to setup the code so that after first login, if the person came in as .../admin.php then the will get that as the default url extension. Or similiarly if they com in as .../ a user then they will get that url extension as the default.
Here is the code.
if ($admin !="") {$adminLocation = "admin.php";}
else
{$adminLocation = "admin.php";}
header("Location: http://www...com/.../admin.php"); /* Redirect browser */
header("Location: http://www...com/.../"); /* Redirect browser */
exit;
Currently, the user portion of this is working fine. If I swap the admin line and the user line in the code then the admin url works fine.
Help
Thanks in advance!
I'm trying to setup the code so that after first login, if the person came in as .../admin.php then the will get that as the default url extension. Or similiarly if they com in as .../ a user then they will get that url extension as the default.
Here is the code.
if ($admin !="") {$adminLocation = "admin.php";}
else
{$adminLocation = "admin.php";}
header("Location: http://www...com/.../admin.php"); /* Redirect browser */
header("Location: http://www...com/.../"); /* Redirect browser */
exit;
Currently, the user portion of this is working fine. If I swap the admin line and the user line in the code then the admin url works fine.
Help
Thanks in advance!