[eluser]benfike[/eluser]
Hi!
I now work on a POLL system, and have an Question. How can I post the selected answer?
And then I Post that, add +1 vote for that answer.
Code:
<form action="[b]?????[/b]" method="post">
<h2><?php echo htmlspecialchars($poll['name']) ?></h2>
<ul>
<?php foreach($answers as $answer):?>
<li>
<input id="answer_<?php echo $answer['id'] ?>" name="poll_answer_id" type="radio" value="<?php echo $answer['id'] ?>" />
<label for="answer_<?php echo $answer['id'] ?>">
<strong><?php echo ($answer['answer']) ?></strong>
(<?php echo $answer['votes'] ?>)
</label>
</li>
<?php
endforeach;
?>