Hello, I get the error Parse error: parse error, unexpected T_VARIABLE about this part of my script; $sql5="INSERT INTO $login_logs_tbl (user_id, ip, logged_date, logged_timestamp) VALUES("$vuserid[0]", "$_SERVER['REMOTE_ADDR']", $date, $timestamp)"; $result5=mysql_query($sql5); PHP: Can you see what's causing the error? I've tried but I can't figure out what... Best Regards Oskar
$sql5="INSERT INTO $login_logs_tbl (user_id, ip, logged_date, logged_timestamp) VALUES('$vuserid[0]', '{$_SERVER['REMOTE_ADDR']}', $date, $timestamp)"; $result5=mysql_query($sql5); PHP:
Or, more like your way: $sql5="INSERT INTO $login_logs_tbl (user_id, ip, logged_date, logged_timestamp) VALUES(".$vuserid[0].", ".$_SERVER['REMOTE_ADDR'].", $date, $timestamp)"; $result5=mysql_query($sql5); PHP:
The IP will need to have single quotes around it.. so basically the same but VALUES(".$vuserid[0].", '".$_SERVER['REMOTE_ADDR']."', $date, $timestamp) PHP: