Authentication programming
| From: | Jordan Elver | Date: | Tue, 14 Jan 2003 20:07:45 +0000 |
| Subject: | Authentication programming | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-131607@lists.php.net to get a copy of this message | ||
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.
<?php
/* authenticate */
$page_permission = 'admin';
include('includes/login.inc');
/* other page functionality */
?>
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?
Cheers,
Jord
--
Jordan Elver
There's no 'I' in 'team'. But then there's no 'I' in
'useless smug colleague',
either. And there's four in 'platitude-quoting idiot'. Go figure. -- David
Brent (The Office)