My SQL query was working fine just 5 hours ago and now it's not? I have not touched a thing.
Can someone please help me get to the bottom of this, it should get the users ip address and store it in the table along with the current time and date, its not inserting anything, would appreciate some help.
Here is my table:
+-------------------------------------------------------------+
|session_id | user_ip | session_start | session_end|
|===========|================|===================|============|
| 1| 192.135.123.13| 23:02:20 10:23 | NULL |
+-------------------------------------------------------------+
Here is my SQL:
// GET IP ADDRESS
$sql = "INSERT INTO ptb_sessions (session_id, user_ip, session_start, session_end) VALUES (NULL, '" . $_SERVER['REMOTE_ADDR'] . "', now(), NULL);";
mysql_query($sql, $connection); ?>