|
|
kujox 4/14/2007 |
[codebox] $strSQLInsert = "insert into _access_log (Field1,ID, username, access_time, ip_address) values ("login", {$_SESSION["ID"]= mysql_insert_id();} $username,".$values["Date"].",$values['ip_address'] = $_SERVER['REMOTE_ADDR']; )"; }[/codebox]
|
|
|
P
|
powerchuck author 4/15/2007 |
|
Kujox, thanks for the help! That's the hardest part for me. |
|
|
J
|
Jane 4/16/2007 |
|
Hi, $strSQLInsert = "insert into _access_log (Field1, username, access_time, ip_address) values ("; $strSQLInsert .= "'login',"; $strSQLInsert .= "'".$_SESSION['UserID']."'"; $strSQLInsert .= date('Y-m-d H:i:s').","; $strSQLInsert .= "'".$_SERVER['REMOTE_ADDR']."')"; |
|
|
P
|
powerchuck author 4/16/2007 |
|
Thanks for your help Jane, |
|
|
L
|
larsonsc 4/16/2007 |
|
I haven't used the AfterSuccessfulLogin event before, so I may be completely off on this, but I don't see anything actually executing the SQL query in that event. Shouldn't there be a line that actually calls $strSQLInsert? If I'm correct, I would think the event would look like this: function AfterSuccessfulLogin()
|
|
|
|
Alexey admin 4/17/2007 |
|
Hi, global $conn; $strSQLInsert = "insert into _access_log (Field1, username, access_time, ip_address) values ("; $strSQLInsert .= "'login',"; $strSQLInsert .= "'".$_SESSION['UserID']."'"; $strSQLInsert .= "'".date('Y-m-d H:i:s')."',"; $strSQLInsert .= "'".$_SERVER['REMOTE_ADDR']."')"; |
|
|
P
|
powerchuck author 4/17/2007 |
|
I get the error |
|
|
V
|
Vladimir 4/18/2007 |
|
Hi, powerchuck function AfterSuccessfulLogin() { //** Insert a record into access_log table **** global $conn; $strSQLInsert = "insert into _access_log (Field1, username, access_time, ip_address) values ("; $strSQLInsert .= "'login',"; $strSQLInsert .= "'".$_SESSION['UserID']."',"; $strSQLInsert .= "'".date('Y-m-d H:i:s')."',"; $strSQLInsert .= "'".$_SERVER['REMOTE_ADDR']."')"; db_exec($strSQLInsert,$conn); } |
|
|
P
|
powerchuck author 4/18/2007 |
|
Wow, That fixed it - Awesome and thanks! |
|