<h2 style="font-size: 20px;">
                                                <?php 
echo stripslashes($poll_data[0]['poll_title']);
echo ' ' . $manage;
?>
                                            </h2>
                                            <br/>
                                            <font size="2px"><?php 
echo stripslashes($poll_data[0]['poll_question']);
?>
</font>
                                            <br/>
                                            <br/>
                                            <b>Total votes: <?php 
echo $poll->getNumOfVotes($id);
?>
</b><br />
                                                <fieldset class="question">
                                                    <legend><?php 
echo stripslashes($poll_data[0]['poll_title']);
?>
</legend>
                                                    <table border="0" width="100%">
                                                        <?php 
//display the options and vote percentages
$options = $database->processQuery("SELECT `id`,`option` FROM `poll_options` WHERE `belongs` = ? ORDER BY `id` ASC", array($id), true);
foreach ($options as $option) {
    //get the number of people who chose the option
    $database->processQuery("SELECT * FROM `votes` WHERE `option_id` = ?", array($option['id']), false);
    //number of people that chose the option
                                            <h2 style="font-size: 20px;">
                                                <?php 
echo stripslashes($poll_data[0]['poll_title']);
echo ' ' . $manage;
?>
                                            </h2>
                                            <font size="2px">
                                                <?php 
echo stripslashes($poll_data[0]['poll_question']);
?>
                                            </font>
                                            <br/>
                                            <br/>
                                            <b>
                                                Total votes:	<?php 
echo $poll->getNumOfVotes($id);
?>
                                            </b>
                                            <br />
                                            <form action="addvote.php" method="POST">
                                                <input type="hidden" name="id" value="<?php 
echo $id;
?>
">
                                                <fieldset class="question">
                                                <legend><?php 
echo $poll_data[0]['poll_title'];
?>
</legend>
                                                <table border="0" width="100%">
                                                        <?php