I'm not quite sure how to do the database side of this, as i am a beginner. I basically want the database to hold the election data and this code will print it to HTML.
Thanks
$result = mysql_query('SELECT * FROM table') or exit(mysql_error());
echo '
<table border="1">
<tr>
<td><b>Town</b></td>
<td><b>Canidate 1</b></td>
<td><b>Canidate 2</b></td>
</tr>
';
while ($row = mysql_fetch_assoc($result))
{
echo '
<tr>
<td>' . $row['town'] . '</td>
<td>' . $row['votes_candidate1'] . '</td>
<td>' . $row['votes_candidate2'] . '</td>
</tr>
';
}
echo '</table>';