Selam, jquary beğeni sistemi ekledim siteme ajax.php de cookies kontrol ettiriyorum ama işe yaramıyor nerde hata yapıyorum acaba

<?php




if(isset($_POST)){
	extract($_POST);

if ( $_COOKIE["oh_{$item}"] )
      {
         
      }
      else
      {

	
	//check if item liked or disliked ??
	($option) ? $like = 1 : $dislike = 1;

	// what to update ?
	($like) ? $action = "likes" : $action = "dislikes";

	// check if entry allready exists ??
	$exist = mysql_num_rows(mysql_query("select * from ".$dbtable." where `id` =".$item));
	
	if(!$exist){
		
	}else{
		mysql_query("update ".$dbtable." set ".$action." = ".$action." +1 where `id` = ".$item);
        setcookie("oh_{$item}", true, time() + (60 * 60 * 24 * 30) );
       
	}

	// get review count
	$count = mysql_fetch_assoc(mysql_query("select * from ".$dbtable." where `id` = ".$item));
	echo json_encode($count);
} 
}
?>