I want to password protect a certain area of my site. I think I have managed to create the the call (time will tell). What command(s) do I need to point to the next link. If the pswd is good where do I place the URL for the subsequent page.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<% @LANGUAGE = VBSCRIPT %>
<%
DIM sQry, rs, Cnn1, myDSN, recfnd, strUserID
dim UserId
UserId = request.form("strUserID"
WhatNow = request.querystring=("action"
Set Cnn1 = Server.CreateObject("ADODB.Connection"
Cnn1.connectiontimeout=30
Cnn1.commandtimeout=40
myDSN="PROVIDER=Microsoft.Jet.OLEDB.4.0;"
myDSN=myDSN & "data source=C:\Access 7.0 Data\My_data.mdb;"
Cnn1.Open(myDSN)
If request.form("UserID"
= Null then
cnn1.close
set cnn1 = nothing
Response.write "<a href='UserLogon.asp'>"
Response.write "You must enter your ID "
response.write "</a>"
end if
recfnd = false
sQry = "SELECT ID FROM VisitorLogonTbl"
SQry = SQry & "Where ID=" & UserID
set rs = Cnn1.execute(sQry)
If (strComp(rs("ID"
, UserID) = 0) then
recfnd = true
end if
If recfnd = false then
rs.close
set rs = nothing
cnn1.close
set cnn1 = nothing
Response.write "<a href='UserLogon.asp'>"
Response.write "Invalid User ID "
response.write "</a>"
response.end
end if
%>
Thank you so much
Trudye
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<% @LANGUAGE = VBSCRIPT %>
<%
DIM sQry, rs, Cnn1, myDSN, recfnd, strUserID
dim UserId
UserId = request.form("strUserID"
WhatNow = request.querystring=("action"
Set Cnn1 = Server.CreateObject("ADODB.Connection"
Cnn1.connectiontimeout=30
Cnn1.commandtimeout=40
myDSN="PROVIDER=Microsoft.Jet.OLEDB.4.0;"
myDSN=myDSN & "data source=C:\Access 7.0 Data\My_data.mdb;"
Cnn1.Open(myDSN)
If request.form("UserID"
cnn1.close
set cnn1 = nothing
Response.write "<a href='UserLogon.asp'>"
Response.write "You must enter your ID "
response.write "</a>"
end if
recfnd = false
sQry = "SELECT ID FROM VisitorLogonTbl"
SQry = SQry & "Where ID=" & UserID
set rs = Cnn1.execute(sQry)
If (strComp(rs("ID"
recfnd = true
end if
If recfnd = false then
rs.close
set rs = nothing
cnn1.close
set cnn1 = nothing
Response.write "<a href='UserLogon.asp'>"
Response.write "Invalid User ID "
response.write "</a>"
response.end
end if
%>
Thank you so much
Trudye