11-26-2010, 02:24 PM
This is a good way of recording their IP into an SQL database, along with their username:
PHP Code:
if((isset([action]))) {
$sql2="INSERT INTO [table] (username, ip) VALUES ('$_SESSION[SESS_LOGIN]','$_SERVER[REMOTE_ADDR]')";
mysql_query($sql2);
}