CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> Archive -> GotoCode Archive

 user logs

Print topic Send  topic

Author Message
Ali53
Posted: 10/30/2002, 1:24 AM

Hello

How can I make user log file ?

and I want to take users ip address

Thanks
Nicole
Posted: 10/31/2002, 6:43 AM

Hello,
You can create special table where store the IP, date, some other info if you need of logged in user.
You should execute custom sql query that inserts new record in the table right after successful login.
If you need more detailed description, please let me know programming language and application (CC or CCS) you’re using.
GM
Posted: 10/31/2002, 7:07 AM

Nicole,
I need to have that feature on my website also. I am using PHP, MySQL. Can you post the codes or detail on that subject please?
Thank you.
GM
Posted: 10/31/2002, 7:11 AM

Nicole,
By the way, I am using CCS.
Thank you.
Nicole
Posted: 11/01/2002, 2:12 AM

Hello,
You should include custom code into loginpagename_DoLogin_OnClick() event. Namely after successful log in you should create new connection and execute custom query that inserts new record into log table. Here is sample PH code:
if(!CCLoginUser($Login->login->Value, $Login->password->Value))
{
$Login->Errors->addError("Login or Password is incorrect.");
$Login->password->SetValue("");
return false;
}
else
{
// write new record into user_log table.=============
$conn = new clsDBMySQLconn();
$conn->query("insert into user_log(user_id, user_ip, log_date) values (".CCGetSession("UserID").", '".getenv("REMOTE_ADDR")."', '".date("Y-m-d H:n:s")."')");
//====================================================

Sonny
Posted: 11/01/2002, 10:20 AM

Nicole: I use CCS and asp with templates. Could you post the code for this?
tamac
Posted: 11/01/2002, 3:15 PM

Nicole: I use CC and asp with templates. Could you post the code for this too?

   


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

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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