How to prevent double login with same account? , hv any ideas? thanks
I'm taking a shot in the dark here, but this is what I think could be done...
On user authentication (finding their user name and matching a password) flag their user name in the database as being logged in. Then in the global.asa file make sure to remove the flag from the database for their user name when the session ends.
-
If rs("LoggedIn") = -1 Then
-
response.redirect("oops.asp")
-
Else
-
'Continue with validation of password and setting the LoggedIn variable.
-
sql="UPDATE [Users] SET [Users].LoggedIn = -1 WHERE ((([Users].User)=""user1""));"
-
End If
Then on session_end
-
sql="UPDATE [Users] SET [Users].LoggedIn = 0 WHERE ((([Users].User)=""user1""));"