Hi all,

I just need a quick sanity check.  I was going through some old scripts,
cleaning them up, optimising them, etc etc... and then I opened my OLD
user/sessions management library...

For some reason (inexperience probably, or a bad article), it was set-up so
that both the uid and pwd were set as session variables, and EACH PAGE on
the site checked the uid & pwd against the database...  this seems like a
lot of overhead to me.

Here's what I'd like to do:

login page validates user, and registers $_SESSION['uid'] (and any others I
need, like admin = true)

then, all other pages on the site will just need
session_start();

rather than the current call to the database to validate the user on every
page.


I know the above should be fine, but I'm just checking if there's any reason
why I choose to call the DB on every page... it was about 2 years ago, so my
guess is "inexperience" :)

TIA

Justin French
--------------------
http://Indent.com.au
Web Development & 
Graphic Design
--------------------


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

Reply via email to