Message: Can someone please help me with my code below. I want it to check
authentication on my login page and if not logged in or no cookies etc.. I
want it to show the page the code is currently on..
Obviously Ive found out respond.end is not the solution.. as the html does
appear and using response.redirect "home.asp" just creats a circular code..
arhhhhh
Please help.. many thanks
<%if Session("StrLoginStatus")=0 then
Call ChkCookies
end if
if ChkCookies=0 then
response.end
else
Call ChkUser
end if
select case ChkUser
case 0
Response.end
case 1,2,3,4,5
Response.redirect("welcome.asp")
end select
%>
I'm not 100% sure if i understand your question correctly.
I am taking it that you want the login page to be redisplayed if login
details are incorrect??
to do this just use your current page that checks details but include a
procedure something like that below which is called when incorrect details
are entered :
<%
' Show the Login Page
sub showLogin
%>
<!-- #include file="login.asp" -->
<%
response.end
end sub
%>
this will then show the login page when the details are incorrect and you
can pass any variable to it you would like.......say tell them if it is
either their username or password which is incorrect
hope this is what you meant