Forums
This topic is locked
Stumped like a tree
Posted 28 Aug 2002 05:14:18
1
has voted
28 Aug 2002 05:14:18 aegis kleais posted:
I've made a custom login script that works fine (UD checks the username and password and logs them in) However, some select people, when they submit the form are returned to the same page, but with the fields now blank (where username and password go) I've done tests and their browsers do hold session variables, they're not behind firewalls or what not.So, I'm making a beta page they can goto where they can supply the username and password in the URL.
here's the code I have so far:
<%
if (Request.QueryString("username"




'set variables
un = Request.QueryString("username"

pw = Request.QueryString("password"

access = false
'check for valid users
if (CStr(un) = "aegis"


access = true
Session("MM_Username"

end if
if (access = true) then
Response.Redirect("index.asp"

end if
End If
%>
Sure enough when I enter login_beta.asp?username=aegis&password=kleais
I am sent to index.asp. Now, for some reason, this code on index.asp keeps sending me back to the login.asp page:
un = Session("MM_Username"

if un = "" then Response.Redirect("login.asp"

if Request.Cookies("masterCookie"


Response.Cookies("masterCookie"

Response.Cookies("masterCookie"



Response.Cookies("masterCookie"



end if
For some reason, when I set Session("MM_Username"

The indexpage creates a records set from a table dbo.Users where fldUsername = Session("MM_Username"

Aegis Kleais
New Media Web Developer
(DWMX : IIS5.1 : SQL2K : WXP : ASP[VB/JS])