Re: How do I redirect to a new php file from the one I am in?
From: Chris Hope (blackhole_at_electrictoolbox.com)
Date: 04/07/04
- Next message: Lochness: "Please help. That darn header command"
- Previous message: Jochen Daum: "Re: SMS Sending by SSL Connection"
- In reply to: C-man: "How do I redirect to a new php file from the one I am in?"
- Next in thread: John Dunlop: "Re: How do I redirect to a new php file from the one I am in?"
- Reply: John Dunlop: "Re: How do I redirect to a new php file from the one I am in?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 07 Apr 2004 12:29:32 +1200
C-man wrote:
> Basically I have a login.php script that takes the users login and
> password, I then search in the database for the entry and discover if they
> have access 0 which is admin or access 1 which is normal user. Based on
> this I want to redirect the user to a new php file. Either admin.php or
> user.php depending on the access level.=l. Simple solution I am sure.
if($access == 0) {
header("Location: admin.php");
}
else {
header("Location: user.php");
}
I'm pretty sure I once read somewhere that the filename specified is
supposed to be a full url containing the domain name etc as well but it's
always worked for me just specifying the filename.
Chris
-- Chris Hope The Electric Toolbox Ltd http://www.electrictoolbox.com/
- Next message: Lochness: "Please help. That darn header command"
- Previous message: Jochen Daum: "Re: SMS Sending by SSL Connection"
- In reply to: C-man: "How do I redirect to a new php file from the one I am in?"
- Next in thread: John Dunlop: "Re: How do I redirect to a new php file from the one I am in?"
- Reply: John Dunlop: "Re: How do I redirect to a new php file from the one I am in?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|