Hello,
I have this site to where people can get access to via a username and passwrod. THere is also a download section in here, but i want to limit the amount of downloads, but i also am covering up where the download is located. So when someone hits download on the page, they get sent to an asp page. This asp page has a response.redirect to download the file.
I have stored the peoples username and password in a session. I can "response.write" the infromatino that is in the session, yet i can not assign that information to a variable. Any help you can provide will be appreciated:
Thanks!
I have this site to where people can get access to via a username and passwrod. THere is also a download section in here, but i want to limit the amount of downloads, but i also am covering up where the download is located. So when someone hits download on the page, they get sent to an asp page. This asp page has a response.redirect to download the file.
I have stored the peoples username and password in a session. I can "response.write" the infromatino that is in the session, yet i can not assign that information to a variable. Any help you can provide will be appreciated:
Code:
<%
If Session("login") = FALSE Then
Response.Redirect "http://www.yahoo.com"
Else
Dim myconn, verify, blnLoggedIn, user, pass, site, logged, objRS, exceeded
Set verify = Server.CreateObject("ADODB.Connection")
verify.open = (SQL LOGIN STUFF GOES HERE)
Response.Write(Session("username"))
Response.Write(Session("password"))
user = Session("username")
pass = Session("password")
exceeded = 5
Set objRS = myconn.execute("SELECT id, download, totaldl FROM testing WHERE username='" & user & "' AND pass='" & pass & "';")
If objRS.EOF Then '''NO RECORDS MATCH. USER DID NOT LOG IN CORRECTLY
blnLoggedIn = False
Response.Redirect "http://www.yahoo.com"
Else
If objRS("download") >= exceeded Then 'LOGGED IN AN ABNORMAL TIME
blnLoggedIn = false
Response.Redirect "http://www.google.com"
Else '''EVERYTHING PASSED PROCEEDE WITH DOWNLOAD
blnLoggedIn = True
verify.execute("UPDATE testing set download = (download + 1) , totaldl = (totaldl + 1) WHERE username='" & user & "' AND pass='" & pass & "';")
End If
End If
End If
%>
<html>
<head>
<title>Logged</title>
</head>
<body>
<%
Response.Redirect "http://ps2.ign.com"
%>
</body>
</html>Thanks!




