Ce trebuie modificat, modifici tu
<?php
session_start();
if(isset($_COOKIE['voted']){
$_SESSION['voted'] = $_COOKIE['voted'];
}
if(isset($_GET['id'])) $id=$_GET['id']; else $id=false;
if($id)
{
if(isset($_SESSION['voted']))
header("location: ".$_SERVER['PHP_SELF']);
else
{
$currentvotes=mysql_fetch_array(mysql_query("select votes from pols where id='".$id."'"));
$newvotes=$currentvotes[0]+1;
mysql_query("update pols set votes='".$newvotes."' where id='".$id."'");
$_SESSION['voted'] = time();
setcookie("cookvoted", $_SESSION['voted'], time()+60*60*24*100, "/");
header("location: ".$_SERVER['PHP_SELF']);
}
}
else
{
$sql=mysql_query("select * from pols order by name ASC");
while($row=mysql_fetch_array($sql)):
$nr = mysql_fetch_array(mysql_query("select count(*) from pols"));
print $row['name']." - ".$row['votes']." => <a href='".$_SERVER['PHP_SELF']."?id=".$row['id']."' title='Vote ".$row['name']."'>Vote ".$row['name']."</a><br>";
endwhile;
}