Takze cele to vyzera takto:
<?
$hours = date("H")*60*60;
$minutes = date("i")*60;
$seconds = date("s");
$time_seconds = $hours+$minutes+$seconds;
$dozajtra_seconds = 3600*24-$time_seconds;
$expire = time()+$dozajtra_seconds;
define ("cookie", $zaznam["film_id"]);
if (!(isset($_GET["name"]) and ($_COOKIE[cookie])=="1"))
{
mysql_query("update film set film_views=film_views+1 where film_name2='".$_GET["name"]."'");
mysql_query("update film set film_viewsall=film_viewsall+1 where film_name2='".$_GET["name"]."'");
SetCookie ($zaznam["film_id"], "1", $expire);
}
?>
a neviem preco, ale dakedy mi to do mysql prirata do databaze +1 ale hocikedy sa stane ze to na jeden load pripocita +2 a nechapem preco... na dalsi load to uz nic nepocita... takze cookies funguje... len potrebujem vyriesit problem s tym, ze mi to dakedy zapocita +2 :( aj ked som na stranke sam....
Je to na stranke:
www.kuknito.sk