J
JEROME
Hi, A few questions im afraid. Im trying to password protect a link on my
home page.
How do i enter the script onto the page without it showing. Im pasting as
normal in html view.
At the bottom of "post" it says add script to EVERY page to protect etc. Do
i have to make this page "asp" . How
All im trying to do is password protect (one word for all) one page linked
from my home page.
Thanks to anyone who has bothered to try and understand/read this.
I have found this as a one word password script....
The most simple approach to this (assuming you do not have admin rights to
the server), is listed below:
2 .asp files: form.asp, authenticate.asp
Code for form.asp:
<HTML>
<BODY>
<form method="POST" action="http://www.yourdomain.com/authenticate.asp">
<input type="text" name="username" size="20"><br>
<input type="password" name="pword" size="20"><br>
<input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2">
</form>
</BODY>
</HTML>
Change the http://www.yourdomain.com above.
Code for authenticate.asp:
<% @ Language=VBScript %>
<%If request.form("username") = "missuser" and request.form("pword") =
"missuserspassword" then
session("SignedIn") = True
response.redirect("http://www.yourdomain.com/protected/default.asp")
else:
response.redirect("http://www.yourdomain.com/form.asp")
end if%>
Change the missuser and missuserspassword above to the username and password
of your choice.
Change the http://www.yourdomain.com above.
Then, at the top of EVERY .asp page you want to protect, add the following
script:
<%If session("SignedIn") <> true then
response.redirect("http://www.yourdomain.com/form.asp")
End if%>
Change the http://www.yourdomain.com above.
This should get you where you want to go.
home page.
How do i enter the script onto the page without it showing. Im pasting as
normal in html view.
At the bottom of "post" it says add script to EVERY page to protect etc. Do
i have to make this page "asp" . How
All im trying to do is password protect (one word for all) one page linked
from my home page.
Thanks to anyone who has bothered to try and understand/read this.
I have found this as a one word password script....
The most simple approach to this (assuming you do not have admin rights to
the server), is listed below:
2 .asp files: form.asp, authenticate.asp
Code for form.asp:
<HTML>
<BODY>
<form method="POST" action="http://www.yourdomain.com/authenticate.asp">
<input type="text" name="username" size="20"><br>
<input type="password" name="pword" size="20"><br>
<input type="submit" value="Submit" name="B1"><input type="reset"
value="Reset" name="B2">
</form>
</BODY>
</HTML>
Change the http://www.yourdomain.com above.
Code for authenticate.asp:
<% @ Language=VBScript %>
<%If request.form("username") = "missuser" and request.form("pword") =
"missuserspassword" then
session("SignedIn") = True
response.redirect("http://www.yourdomain.com/protected/default.asp")
else:
response.redirect("http://www.yourdomain.com/form.asp")
end if%>
Change the missuser and missuserspassword above to the username and password
of your choice.
Change the http://www.yourdomain.com above.
Then, at the top of EVERY .asp page you want to protect, add the following
script:
<%If session("SignedIn") <> true then
response.redirect("http://www.yourdomain.com/form.asp")
End if%>
Change the http://www.yourdomain.com above.
This should get you where you want to go.