Tried this but it didn't work either... :
$con = mysql_connect("p-roject.com.mysql","p_roject_com","qhbJ5XZm","p_roject_com");
if (!$con)
{
die('Could not connect: ' . mysql_error());
}
$username = $_POST['username'];
$ip = $_SERVER['REMOTE_ADDR'];
$sql = "UPDATE users SET last_login='$ip' WHERE username='$username'";
mysql_query($sql,$con);
?>
last_login remains unchanged