View Full Version : Password Protected page

10-27-2003, 02:15 PM
I want to have one php page password protected. I know the login script could check values in a database but i don't really want to use a database as there will only be one username and one password.

Can this be done using a text file? how about the security?

All i really want is for someone to login and view this page that has a list of confidental links to documents on an intranet.


10-27-2003, 03:58 PM
If you only need 1 user and 1 pass, then do this

name="password" in the form

$hashedpass = md5($password);
if ($username == "blah" && $hashedpass == "md5 value")

10-27-2003, 05:13 PM
Or you can simply use a .htaccess file with a corresponding .htpasswd file.

10-28-2003, 11:00 AM

spookser - how would i use the .htaccess file? have u any decent links on the subject?

10-28-2003, 12:29 PM

That is a good one --

10-28-2003, 12:29 PM

10-28-2003, 12:31 PM
If you had tried the search-link at the top of the forums, maybe you would have found this excellent tutorial:
Comprehensive guide to .htaccess (http://www.javascriptkit.com/howto/htaccess.shtml)

My search for "htaccess" resulted in 3 pages !!

Acknowledge the searchengine and you'll save yourself and others some valuable time!;)

Hey, i'm thinking of putting that into my signature :p

I mean no harm, i'm in a weird mood today... but still, you could probably have used the searchengine :D

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum