I know this has been mentioned before a million times, but I don't really understand it, and in some example it does make sense but when I try to change it it breaks down on me. And also most of the examples don't deal with mysql and/or md5. I'm trying to make an admin login page for a news script and I already have the db setup with the following fields in the users table: id (auto_inc.), username, password (md5'd), email, and admin level (enum 0-3). I know how to connect to the db and select the users table, I just need help understanding how to check the username and password, store a cookie, and check it at all the pages (and some will check admin level for restrictions).