Login checking |
Post Reply ![]() |
Author | |
TechSquared ![]() Newbie ![]() Joined: 01 March 2006 Location: United States Status: Offline Points: 15 |
![]() ![]() ![]() ![]() ![]() Posted: 05 December 2007 at 5:10pm |
I'm currently using an ASP web interface. Has anyone made modifications to one that would make a note in the database as to the last time a client logged in to check mail? I would like to remove stale login entries from my login table.
Sean
|
|
![]() |
|
Desperado ![]() Senior Member ![]() ![]() Joined: 27 January 2005 Location: United States Status: Offline Points: 1143 |
![]() ![]() ![]() ![]() ![]() |
Sean,
That is a definite YES. In my tblLogins, I have several added columns ... one being LastUsed and another being Logins. When a user registers, I force the Logins (int) to = 1 and the LastUsed (datetime) to the current server date & time. In my authenticate.asp page, in the place where the user successfully authenticates, I have code that looks like:
Logins = rs("Logins") + 1
SQL = "UPDATE tblLogins " SQL = SQL & "SET Logins = '" & Logins & "' " SQL = SQL & "WHERE EMail = '" & EmailTo & "'" con.Execute SQL SQL = "UPDATE tblLogins "
SQL = SQL & "SET LastUsed = '" & Now() & "' " SQL = SQL & "WHERE EMail = '" & EmailTo & "'" con.Execute SQL Does that help?
|
|
The Desperado
Dan Seligmann. Work: http://www.mags.net Personal: http://www.desperado.com |
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
This page was generated in 0.164 seconds.