on 15/01/03 7:07 AM, Jordan Elver ([EMAIL PROTECTED]) wrote:

> Hi,
> I'm about to start a new project which will require a login system. The system
> should allow for different types of access on a per page basis. I'm going to
> achieve the login system using sessions, which I have done before.
> 
> My problem is that I don't want to have to do much login checking on the
> actual pages within the system. I would like it to be included and handled
> oustide of the main application.

yes

> <?php
> /* authenticate */
> $page_permission = 'admin';
> include('includes/login.inc');
> 
> /* other page functionality */
> 
> ?>

yes same thing I do


> So, you set the permission for the individual page. I would also like to do
> this as a class, which I am not experienced in. I haven't found any very
> elegent solutions to this. Could anyone point out some urls or anything to
> show me in the right direction?

it's not *exactly* what you want at all, but if you've got a brain, you can
adapat the concept to what you want with ease (I have)... there is an
article on sitepoint.com / webmasterbase.com by kevin yank.

http://www.WebmasterBase.com/article/319

basically, he ends up with a script called 'restricted.php' which he
includes at the top of any page which he wants to restrict to logged in
users only...

it works fine, but needs updating to account for $_POST/GET/SESSION etc, but
should give you the principals to adapt or write your own.


Cheers,

Justin


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to