|
<?php
|
|
$votes = array();
|
|
if(isset($_COOKIE["votingReg"])) {
|
|
$votes = unserialize($_COOKIE["votingReg"]);
|
|
foreach ($votes as $vote){
|
|
if($_POST['gameJamId'] === $vote) return;
|
|
}
|
|
}
|
|
array_push($votes,$_POST['gameJamId']);
|
|
setcookie("VotingReg", serialize($votes), time() + 86400, "/");
|