Check Traffic Sources

Currently Working on the stuff:
if(isset($_GET['token'])) {
$token = sanitize($_GET['token']);
$sqlcheck = "select `traficsource_source` from `traficsource` where `traficsource_source`='{$token}'";
$result = $dbLink->query($sqlcheck);
if($result->num_rows == 0) {
$sql1="INSERT INTO `traficsource`
(`traficsource_source`, `traficsource_count`, `traficsource_insert`, `traficsource_update`)
VALUES
('{$token}', '1', CURRENT_TIMESTAMP, now())"; $result = $dbLink->query($sql1);
} else {
$sql1="update `traficsource` set `traficsource_count`=(`traficsource_count`+1),`traficsource_update`=now() where `traficsource_source`='{$token}'"; $result = $dbLink->query($sql1);
}
}

Comments

Popular posts from this blog

Function Oriented File Upload PHP

Remote File Download and upload directly to Server using PHP

Page Unload Show Notification to user