Re: [PHP] restrict access to multiple pages

2003-12-09 Thread olinux
I like your second solution better. (seems simpler to me to leave out the nested else...). I'd just write it this way: ?php if(!loggedin()) { // redirect to login page header (Location: http://domain.com/login.php;); exit; } ? Also check out some of these articles for some different

RE: [PHP] restrict access to multiple pages

2003-12-09 Thread Chris W. Parker
Chris Shiflett mailto:[EMAIL PROTECTED] on Monday, December 08, 2003 5:17 PM said: The only risk is forgetting to add this check, since I assume you mean that you have to copy/paste this into every script. You might want to consider whether you can design your application in such a way

Re: [PHP] restrict access to multiple pages

2003-12-09 Thread Kelly Hallman
On Mon, 8 Dec 2003, Chris W. Parker wrote: Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a check at the beginning of each page

RE: [PHP] restrict access to multiple pages

2003-12-09 Thread Pablo Gosse
Kelly Hallman wrote: On Mon, 8 Dec 2003, Chris W. Parker wrote: Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a check at the

RE: [PHP] restrict access to multiple pages

2003-12-09 Thread Pablo Gosse
Kelly Hallman wrote: On Mon, 8 Dec 2003, Chris W. Parker wrote: Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a check at the

[PHP] restrict access to multiple pages

2003-12-08 Thread Chris W. Parker
Hey y'all. Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a check at the beginning of each page that basically does the following:

Re: [PHP] restrict access to multiple pages

2003-12-08 Thread Chris Shiflett
--- Chris W. Parker [EMAIL PROTECTED] wrote: In an effort to prevent circumvention of the login page I've placed a check at the beginning of each page that basically does the following: ?php if(loggedin()) { // entire page of code goes here } else { // redirect back to

Re: [PHP] restrict access to multiple pages

2003-12-08 Thread Justin French
On Tuesday, December 9, 2003, at 12:08 PM, Chris W. Parker wrote: Hey y'all. Ok so I am working on the admin sectin of the e-commerce app I'm writing and I'm hoping there's a better way to do what I am currently doing. In an effort to prevent circumvention of the login page I've placed a