Step 3/4 - Confirm your vote\n";
$result .= "
".htmlspecialchars($election["question"])."
\n";
if (count ($votes_array) >= 1) {
$result .= "You choose to vote for:
\n";
$result .= "\n";
$result .= "
\n";
foreach ($votes_array as $vote) {
$found = FALSE;
foreach ($choices as $choice) {
if ($choice["id"] == $vote) {
$result .= "- ".htmlspecialchars($choice["choice"])."
\n";
$found = TRUE;
break;
}
}
if (!$found) {
$result .= "- Unknown vote: ".htmlspecialchars($vote)."
\n";
$error .= "There was an unkown vote: ".htmlspecialchars($vote)."
\n";
}
}
$result .= "
\n";
$result .= "
\n";
} else {
$result .= "\n";
$result .= "
You choose to vote for none of the possible answers.
\n";
$result .= "
\n";
}
$result .= "To confirm this vote, please continue to the next step. ";
$result .= "To modify your choice, hit the \"Back\" button in your browser.
\n";
return $result;
}
?>