// If this hit was referred by an affiliate - cookie the customer with // the affiliate's ID... Cookie expires in 10 years. //--------------------------------------------------------------------- if (isset($referrer_id)) { setcookie ("referrer_id", $referrer_id, time()+315360000); // Track Hits //------------ $db = mysql_connect("aussied.globatmysql.com", "username", "passwd"); mysql_select_db("dbname",$db); mysql_query("UPDATE af_hits SET counter=counter+1 WHERE af_id = $referrer_id",$db); if (mysql_affected_rows($db) < 1) { $result = mysql_query("INSERT INTO af_hits (af_id, counter) VALUES ($referrer_id, 1)", $db); } mysql_close($db); } ?>
![]() |
|
|