password protect one page ?

C

Carl Zinn

Hi all,

I got my website up and runningon godaddy, with a home page + 5 other pages
and links
between them all. I used the "personal" template in FP 2003 and it went
pretty smooth. Now I would like to add one password protected page for
members only. I've never done "code writing" but would like to have a link
button, or something, that will simply ask for a password before going to
that
restricted page. Can you help me please?

Carl
 
S

Stefan B Rusynko

See http://support.microsoft.com/default.aspx?scid=kb;en-us;825451
Your host will have to support subwebs and unique permissions under the FP Server Extensions


--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Hi all,
|
| I got my website up and runningon godaddy, with a home page + 5 other pages
| and links
| between them all. I used the "personal" template in FP 2003 and it went
| pretty smooth. Now I would like to add one password protected page for
| members only. I've never done "code writing" but would like to have a link
| button, or something, that will simply ask for a password before going to
| that
| restricted page. Can you help me please?
|
| Carl
|
|
 
P

Paul C

Hi Carl
Thomas A Rowe kindly gave me this code which works really well if you are
happy to have only one password for all but want a really simple solution.
the thread for this is here ( login.asa files PaulC dated 13/7/2007
but the code is below just change the password

<% ' This goes at the top of each page to be protected above the opening
<html> tag.
Login=LCase(Request.Form("pLogin"))
If Login = "passw" Then
Session("Authenticated") = 1
Else
Session("Authenticated") = 0
End If
%>



<HTML>
<HEAD>
<TITLE>sample</TITLE>
</head>

<BODY>
<% If Session("Authenticated") = 1 Then %>
<p><b><font face="Arial" size="3" color="#000000">Content to see when logged
in</font></b></p>
<% End If %>
<P>
<% If Session("Authenticated") = 0 Then %>
<p><b><font face="Arial" size="3" color="#000000">log in box seen when not
logged in</font></b></p>
<table border="0" cellpadding="0" cellspacing="0" width="300">
<tr>
<td valign="middle" align="center" width="100%"
bgcolor="#800000">
<table border="0" cellpadding="2" cellspacing="1"
width="100%">
<form method="POST" action="simplelogin1.asp">
<tr>
<td width="100%" valign="middle" align="center"
bgcolor="#FFFFFF"
height="50"><b><font face="Arial" size="2" color="#000000">UserID: </font>
</b><input type="text"
size="10" name="pLogin"> <input type="submit" value="Login"
name="Login"></td>
</tr>
</form>
</table></td>
</tr>
</table>
<% End If %>
<p>&nbsp;p>
</BODY>
</html>
 
P

Paul C

When I say change the password I meen the login I have it as "passw" but you
change this to whatever you want the password for the protected page to be
Paul M
 
D

Dan L

If you're hosted on a Linux server and have cPanel, simply password protect a
directory, place your Members Only page in that directory and tell members
what the username/password is to access that page.
 
C

Carl

Uhhh?? Most of the "code" I pasted in shows on the page, including the log
in box. I didn't change your pass word and when I gtry it I get a "can't go
there" message. It looks like this:

Login=LCase(Request.Form("pLogin")) > If Login = "passw" Then >
Session("Authenticated") = 1 > Else > Session("Authenticated") = 0 > End If
%> > > > > > > > > > > >
Content to see when > logged in

log in box seen when not > logged in
name="pLogin"> name="Login"> >p> > >

Any ideas?? Carl
 
S

Stefan B Rusynko

Your host server needs to support ASP to use that solution

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


| Uhhh?? Most of the "code" I pasted in shows on the page, including the log
| in box. I didn't change your pass word and when I gtry it I get a "can't go
| there" message. It looks like this:
|
| Login=LCase(Request.Form("pLogin")) > If Login = "passw" Then >
| Session("Authenticated") = 1 > Else > Session("Authenticated") = 0 > End If
| > %> > > > > > > > > > > >
| Content to see when > logged in
|
| > >
| > >
|
| log in box seen when not > logged in
|
| > > > bgcolor="#800000"> > width="100%"> >
| > > bgcolor="#FFFFFF" > height="50">UserID: > size="10"
| name="pLogin"> name="Login"> >
| >
| > >
| > > >
| p> > >
|
| Any ideas?? Carl
|
|
|
|
|
| | > Hi Carl
| > Thomas A Rowe kindly gave me this code which works really well if you are
| > happy to have only one password for all but want a really simple solution.
| > the thread for this is here ( login.asa files PaulC dated 13/7/2007
| > but the code is below just change the password
|
|
| >
| > <% ' This goes at the top of each page to be protected above the opening
| > <html> tag.
| > Login=LCase(Request.Form("pLogin"))
| > If Login = "passw" Then
| > Session("Authenticated") = 1
| > Else
| > Session("Authenticated") = 0
| > End If
| > %>
| >
| >
| >
| > <HTML>
| > <HEAD>
| > <TITLE>sample</TITLE>
| > </head>
| >
| > <BODY>
| > <% If Session("Authenticated") = 1 Then %>
| > <p><b><font face="Arial" size="3" color="#000000">Content to see when
| > logged in</font></b></p>
| > <% End If %>
| > <P>
| > <% If Session("Authenticated") = 0 Then %>
| > <p><b><font face="Arial" size="3" color="#000000">log in box seen when not
| > logged in</font></b></p>
| > <table border="0" cellpadding="0" cellspacing="0" width="300">
| > <tr>
| > <td valign="middle" align="center" width="100%"
| > bgcolor="#800000">
| > <table border="0" cellpadding="2" cellspacing="1"
| > width="100%">
| > <form method="POST" action="simplelogin1.asp">
| > <tr>
| > <td width="100%" valign="middle" align="center"
| > bgcolor="#FFFFFF"
| > height="50"><b><font face="Arial" size="2" color="#000000">UserID: </font>
| > </b><input type="text"
| > size="10" name="pLogin"> <input type="submit" value="Login"
| > name="Login"></td>
| > </tr>
| > </form>
| > </table></td>
| > </tr>
| > </table>
| > <% End If %>
| > <p>&nbsp;p>
| > </BODY>
| > </html>
| >
| >
| >
| > | >> Hi all,
| >>
| >> I got my website up and runningon godaddy, with a home page + 5 other
| >> pages and links
| >> between them all. I used the "personal" template in FP 2003 and it went
| >> pretty smooth. Now I would like to add one password protected page for
| >> members only. I've never done "code writing" but would like to have a
| >> link button, or something, that will simply ask for a password before
| >> going to that
| >> restricted page. Can you help me please?
| >>
| >> Carl
| >>
| >>
| >
| >
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top