I'm having an issue with a query of MySQLi I'm trying to submit, but no errors are being reported, and absolutely nothing is happening. I've tried multiple methods for a fix, and nothing.
The code:
$IP = $_SERVER['REMOTE_ADDR'];
$ISP = GetISP($IP);
$Referrer = DetermineReferrer();
$Browser = GetBrowser();
$OS = GetOS();
$Time = Date("F/j/Y, g:i a");
If($IP){
mysqli_query($Connection, "INSERT INTO tracker (ip, isp, referrer, browser, os, time)
VALUES ('mysqli_real_escape_string($IP)',
'mysqli_real_escape_string($ISP)',
'mysqli_real_escape_string($Referrer)',
'mysqli_real_escape_string($Browser)',
'mysqli_real_escape_string($OS)',
'mysqli_real_escape_string($Time)')");
}
mysqli_close($Connection);
?>
The If($IP)
was actually a temporary test; that's where I'll be checking if an IP is already in the database, which if possible could you lead me on a track for that?
I appreciate all feedback, whether negative or positive, it can still be helpful.
Edit: I'm going to supply the connect script, although it shouldn't be the problem as an error would display
<?php
Define('Host', 'localhost');
Define('Username', 'username');
Define('Password', 'password');
Define('Database', 'database name');
$Connection = mysqli_connect(Host, Username, Password, Database);
?>
Out of curiosity, while researching I seen something about using SET instead of VALUES. Could that have anything to do with this?