FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

password coding help

 


gtb
i want code for a simple password box. so, for example, if you go to a certain page, all it shows is a password box in the center, and if you enter in the right password it lets you go on to the next page. also, if it's possible to do (somewhat) easily, is there a way to make all the pages blocked off unless you put in the password?
foggy
Regarding the second part of your question (requiring a log on for an entire group of files) The easiest and a very effective way would be .htaccess password protection. Luckily for you, cPanel has a feature to do this automatically for you.

First, put all the files that you want to protect in a separate folder, i.e. /public_html/members/* (alternatively, you can protect the entire /public_html/ directory, but then every single file on your site will need a password)

Second, log in to cPanel and choose the "Password Protect Directories" icon and follow the instructions it displays. If you do it correctly, whenever someone attempts to access a file that is in a directory that you have chosen to be protected, they will be prompted for a username/password combo that you have defined.
gtb
thanks, that worked
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.