If you have a Windows Web server, set up a form with text
boxes named txtUser and txtPswd, and a submit button named
btnSub. Then, in Code view, add this code:
<%
if request("btnSub") <> "" then
if (request("txtUser ") = "top") _
and (request("txtPswd") = "secret") then
Session("loggedin") = "1"
response.redirect("privatepage.asp")
else
Session("loggedin") = "0"
response.redirect("publicpage.asp")
end if
end if
%>
For safety, you should also add this code to
privatepage.asp.
<%
if Session("loggedin") <> "1" then
response.redirect("publicpage.asp")
end if
%>
Jim Buyens
Microsoft FrontPage MVP
http://www.interlacken.com
Author of:
*----------------------------------------------------
|\---------------------------------------------------
|| Microsoft Office FrontPage 2003 Inside Out
||---------------------------------------------------
|| Web Database Development Step by Step .NET Edition
|| Microsoft FrontPage Version 2002 Inside Out
|| Faster Smarter Beginning Programming
|| (All from Microsoft Press)
|/---------------------------------------------------
*----------------------------------------------------