If someone clicks one of my adverts, they are sent to red.php. The code is shown below. But the problem I am facing is that my log of commissions earnt do not correspond with those paid out by my advertising supplier.
So, with this in mind, can you see what problems I could face with the code below? Any way I can make it more reliable?
Thanks,
Jon
<?
++$key;
include('db/dbconnect.inc');
$ip = $_SERVER['REMOTE_ADDR'];
$ip_query = @mysql_query("SELECT * FROM logfile WHERE Category = '$category' AND SubCategory = '$productname' AND Product = '$filter' AND Keyword = '$keyword' AND Position = '$key' AND IPaddress = '$ip'");
if (mysql_num_rows($ip_query) < 1) {
mysql_query("insert into logfile(Category, SubCategory, Product, Keyword, Position, Date, Time, Testcode, IPaddress, Nixxieurl1) values('$category', '$productname', '$filter', '$keyword', '$key', curdate(), curtime(), '$test', '$ip', '$url')");
}
$moveit=urldecode($url);
header('location: '.$moveit);
?>