Jord / Kirk,
Im not sure i totally understand here. Jord, are you checking a 'username' & 'password' from a table in a database? If not what exactly are you doing your checking against?
The other comment and question is that I recently developed a JSP (Java Server Pages / Servlets) solution of doing the same thing. I created a DB with a user table which holds user info (username, password and other data). I also created an 'admin' user. In the user table, i created a field named 'accesslevel' and the admin would have an 'accesslevel' of 0 and a regualar user would have an 'accesslevel' of 1.
What this does for me is, everytime a user requests a page, JSP code (or php) verifies if there is a SESSION created and if so, checks the 'accesslevel' of the user making the request for that page. (When the user logs in, a SESSION is created and places a variable named 'accesslevel' in the SESSION.)
When I move this authentication method to PHP I will use MD5 hash the password for extra security.
It seems to work great and I really dont have any problems. However, I have always wondered if this is the RightWay(tm) of doing things.
Comments?
-Buzzlightyear
To Infinity and Beyond