& Quot; PHP ----------- cancel begin -------------------------------------------- if ($ _ GET [& #39; action & #39;] & quot; logout & quot;) {before logout, record the IP address and date of the last successful login include (& amp; #39; conn. php & #39;); $ client_ip $ _ SERVER [& quot; HTTP_CLIENTIP & quot;]; $ user_id $ _ SESSION [& mysqlphp
// ----------- Log out of begin ------------------------------------------ if ($ _ GET ['action'] = "logout") {// Before logging out, record the IP address and date of the last successful login include ('Conn. php '); $ client_ip = $ _ SERVER ["HTTP_CLIENTIP"]; $ user_id = $ _ SESSION ['User _ id']; echo $ client_ip; echo $ user_id; sleep (10); mysql_query ("update users SET limit = $ client_ip, user_last_log_date = unix_timestamp (now () where user_id = $ user_id limit 1"); mysql_close ($ con ); // delete the SESSION unset ($ _ SESSION ['User _ id']); unset ($ _ SESSION ['User _ email ']); unset ($ _ SESSION ['User _ nickname']); echo'
'.' Logout successful! '; Exit ;}