What's the best way to password protect my web pages? Should I use JavaScript, PHP or anything else? Which way is the easiest and which one is the most secure?
Anyone has any code examples?
If you want something simple, you can simply have the passwords and usernames in an SQL database, and use something like this (it's all para-phrased of course, this code will not actually work):
if (isset($loginsubmit)) {
SELECT username, password FROM users WHERE username='$user'
what can i do with it? i think i could use it, because now i have to forward values through query string and stuff like that, so that user doesn't have to type in user/pass twice or even more times..the way i've done it now is a little complicated...
i've made some kind of control panel for my site and i would like to have it password protected...however, i also need to protect other files in the control panel(addarticle.php,deletearticle.php etc). the easiest way would be to protect all files like TWTCommish said, but that can be very annoying for user(entering password every time).
Bookmarks