PDA

View Full Version : How do I create a password protected page?


kiko_friendly
05-21-2005, 09:55 AM
Can someone please tell me how to make one? I found one on www.lissaexplains.com but apparently that one is rubbish. Does anyone know of any really good ones?

kiko_friendly
05-21-2005, 09:56 AM
I mean, one in which you would need a user name and password to enter.

[tab]
05-22-2005, 06:21 AM
Easiest way is with .htaccess, check google.com for some tutorials.

mgonzo
11-12-2005, 10:14 PM
This is a html to password protect a website
where is says text put the username
where it says password enter a password
where it says protected page,thats the page you want protected


if you need further help drop me a line.



<script language="javascript">
<!--//
/*This Script allows people to enter by using a form that asks for a
UserID and Password*/
function pasuser(form) {
if (form.id.value=="text") {
if (form.pass.value=="password") {
location="protected page.html"
} else {
alert("Invalid Password")
}
} else { alert("Invalid UserID")
}
}
//-->
</script>

<center>
<table bgcolor="white" cellpadding="12" border="1">
<tr><td colspan="2"><center><h1><i><b>Login
Area</b></i></h1></center></td></tr>
<tr><td><h1><i><b>UserID:</b></i></h1></td><td><form name="login"><input
name="id" type="text"></td></tr>
<tr><td><h1><i><b>Password:</b></i></h1></td><td><input name="pass"
type="password"></td></tr>
<tr><td><center><input type="button" value="Login"
onClick="pasuser(this.form)"></center></td><td><center><br><input
type="Reset"></form></td></tr></table></center>

Kiwiberry
11-15-2005, 12:23 AM
Not sure about the code above, but [tab] probably has the easiest solution. the .htaccess file

mgonzo
11-15-2005, 12:01 PM
Not sure about the code above, but [tab] probably has the easiest solution. the .htaccess file

YES IT WORKS

their both easy ............... for me html is easiest.

gateshosting
11-17-2005, 01:23 PM
Well, if it was me, and I wanted to get into the page without typing in a password, which is usually how my mind works, I Would look at the source to see how you password protect the page. Then I would see it clearly in the javascript. Even if your javascript is just an include.

Do you know ASP, or have access to the server? If you have access to the server, you can make a directory password protected with IIS. Otherwise, if you host with another company, they usually give you the option of creating password protected pages.

Michael C. Gates
GatesHosting.com
Web Hosting (http://www.gateshosting.com)

garry2005
11-22-2005, 10:46 AM
A possible answer: If your webhoster offers cPanel, it's more than likely that the cPanel already offers a php Login device...all you do is install it in about 1.222 seconds! I stuggled with the same issue with my own website, and the soultion was staring me right in the face all along. Feel free to check it out, if you wish: Go to http://www.lewisaire.com, then to Operations Center, and then try to acces Download Center...can't get much easier than this.

Garry