NYCPHP Meetup

NYPHP.org

[nycphp-talk] best code for Login !.

Raymond DeRoo rainman at deroo.net
Fri Jun 14 08:11:46 EDT 2002


Hans--

> How would this work:
>
> $myparadigm = new Paradigm;
> $myparadigm->Authorize('username','password');
> if( $myparadigm->Result === LOGGED_IN )
>   header('Location: http://me.com/protected.php');
> else
>   header('Location: http://me.com/login.php');

I used to use this type of approach. However I found that more and more 
clients have files which they want protected, not just pages. A such I've 
moved towards mod_auth_mysql or mod_auth_ldap (depending up on size and 
availability). I realize that I can (and have) write a page that will get a 
file on the file-system and pass it through to the user. However the added 
URL complexity tends to confuse the most users.

.r



More information about the talk mailing list