CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP

 Capturing user login data

Print topic Send  topic

Author Message
WhoKnows

Posts: 4
Posted: 06/19/2007, 7:53 AM

I have a simple application, built with ASP using MS SQL database.

I would like to populate a table with user login details ... user, date, time etc., so that I can track users logging into the site.

I have seen a couple of examples using PHP, but I am a novice user only using ASP. (It's too easy using CCS - no great knowledge required).

Could anyone help please ....thanks in advance
View profile  Send private message
wkempees
Posted: 06/19/2007, 4:12 PM

http://forums.codecharge.com/posts.php?post_id=60821&s_keyword=logging

Walter
"WhoKnows" <WhoKnows@forum.codecharge> schreef in bericht
news:64677ede02a2bb@news.codecharge.com...
>I have a simple application, built with ASP using MS SQL database.
>
> I would like to populate a table with user login details ... user, date,
> time
> etc., so that I can track users logging into the site.
>
> I have seen a couple of examples using PHP, but I am a novice user only
> using
> ASP. (It's too easy using CCS - no great knowledge required).
>
> Could anyone help please ....thanks in advance
> ---------------------------------------
> Sent from YesSoftware forum
> http://forums.codecharge.com/
>

WhoKnows

Posts: 4
Posted: 06/20/2007, 9:55 AM

Hi Walter

Thanks for the link. Following your advice, I have created and added a table in my SQL database called TblUserLogin, containing the following fields ...

RecordID (autoincremental)
UserID (numeric)
UserLogin (text)
UserPassword (text)
UserGroup (text)
UserDate (date)
UserTime (time)

Unfortunately, I don't know enough to be able to write the code (ASP). Any chance you could help me further with the code...

Thanks
View profile  Send private message
Wkempees
Posted: 06/21/2007, 4:42 AM

I am not into ASP.
But the Function as described in the post is very basic.
Should be no problem for you to convert to ASP.
The SQL is the same, so the content of the logging function would need
no adjustment I think.\
Just find out how to create the function and call it.

Walter
mhope

Posts: 37
Posted: 06/21/2007, 9:57 PM

Find your login function and add this: (If your adding instead of updating change SQL to suit)

With Header
If NOT CCLoginUser(.Login10.login.Value, .Login10.password.Value) Then
.Login10.Errors.addError(CCSLocales.GetText("CCS_LoginError", Empty))
Header_Login10_Button_DoLogin_OnClick = False
.Login10.password.Value = ""
Else
If Not IsEmpty(CCGetParam("ret_link", Empty)) Then _
Redirect = CCGetParam("ret_link", Empty)
Header_Login10_Button_DoLogin_OnClick = True
'------------Start custom Log user function
If CCGetUserID() Then


your_connection.Execute("UPDATE users SET is_online='1', date_last_login=Now() WHERE user_id="&CCGetUserID)


Else

End If
' -----End custom log user function
End If
End With

Not tested but should work
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.