|
You may have a page which you do not want the world to see. No matter how careful you are, a dedicated hacker will probably gain access, but you can protect a page (or a whole site) from the average Internet user, by setting up a Username and Password requirement.
Requirements : a small form for user input and a short php routine for verification. The files are pwd1.htm and pwd2.php3 Both sample files can be downloaded from ftp://ftp.isle-of-wight.uk.com/pwd (Right click and 'Copy to folder' in IE or 'Save Link As' in Netscape). The input form can be used without modification. A simple extra touch is the disguised password input - anybody looking over your shoulder will see stars, not characters. The php3 file (pwd2.php3) will need the following modifications:-
Experiment with one page in the first instance, but to protect a whole site you could rename pwd1.htm to index.htm or index.html It might be a good idea to see it in operation, so follow this link to the form page. Username fred - Password correct Entering the correct Username and Password will load up the IW Index front page. Incorrect entry of either, will produce a failure message. |