sayfamdaki kod
$res = $db->query("update " . TABLE_ADS . "" . " set viewed=viewed+1 where id = '" . $id . "'");
return 1;
Sayfayı yeniledikçe sayaç artıyor |
6 Mesajlar | 707 Okunma |
$res = $db->query("update " . TABLE_ADS . "" . " set viewed=viewed+1 where id = '" . $id . "'");
return 1;
session_start();
if(@$_SESSION['sayac']!='1') {
$_SESSION['sayac'] = "1";
$res = $db->query("update " . TABLE_ADS . "" . " set viewed=viewed+1 where id = '" . $id . "'");
return 1;
}
session_start();
if(@$_SESSION['sayac']!='1') {
$_SESSION['sayac'] = "1";
$res = $db->query("update " . TABLE_ADS . "" . " set viewed=viewed+1 where id = '" . $id . "'");
return 1;
}
session_start();
if(@$_SESSION['sayac']!=$_SERVER['REQUEST_URI']) {
$_SESSION['sayac'] = $_SERVER['REQUEST_URI'];
$res = $db->query("update " . TABLE_ADS . "" . " set viewed=viewed+1 where id = '" . $id . "'");
return 1;
}