时间:2021-07-01 10:21:17 帮助过:12人阅读
$gid = $_GET["id];
if( !isset($_COOKIE["user"]) ){
setcookie("user","newGuest",time()+3600);
}else {
setcookie("user","oldGuest");
}
if ( $_COOKIE["user"] != "oldGuest") {
$hits_now = $row["hits"]+1;
$pdo->exec("UPDATE `gamedb_game` SET `hits`='$hits_now' WHERE `id` = '$gid'");
}
$gid = $_GET["id];
if( !isset($_COOKIE["user"]) ){
setcookie("user","newGuest",time()+3600);
}else {
setcookie("user","oldGuest_$gid");
}
if ( $_COOKIE["user"] != "oldGuest_$gid") {
$hits_now = $row["hits"]+1;
$pdo->exec("UPDATE `gamedb_game` SET `hits`='$hits_now' WHERE `id` = '$gid'");
}