vote.php
přidání hlasu
php
<?php
$pollAnchor = "";
if (isset($_GET["id"])) {
$id = (int) $_GET["id"];
try {
$poll = new Poll();
$poll->vote($id);
$_SESSION["poll_answer_" . $id] = "Váš hlas byl uložen.";
} catch (PollException $e) {
$_SESSION["poll_answer_" . $id] = $e->getMessage();
}
$pollAnchor = "#poll_" . $poll->getPollIdByAnswer($id);
}
header("location: index.php?main" . $pollAnchor);
Neformátovaný
Přidáno: 7.8.2013
Expirace: Neuvedeno