Code:
////////////////////////////////////////////////
// POLL FORMULAR AUSGABE ODER ERGEBNISSE
//
if(isset($_COOKIE['tg11']['voting']))
{
//Ergebnisse
}
else
{
$sql = "SELECT * FROM poll ORDER BY id_poll DESC LIMIT 1";
$erg = mysql_query($sql);
while($row = mysql_fetch_object($erg))
{
?>
<form method="post" action="index.php?action=addvote">
<table width="155" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="left"><? echo"".$row->frage.""; ?></div></td>
</tr>
<tr><td>
<table width="155" border="0" cellspacing="0" cellpadding="0">
<?
$sql2 = "SELECT poll.id_poll, poll.frage, poll_antworten.id, poll_antworten.poll_id, poll_antworten.antworten, poll_antworten.klicks FROM poll LEFT JOIN poll_antworten ON poll.id_poll=poll_antworten.poll_id WHERE poll_antworten.poll_id='".$row->id_poll."'";
$erg2 = mysql_query($sql2);
while($row2 = mysql_fetch_object($erg2))
{
?>
<tr>
<td width="10"><? echo"<input type=\"radio\" name=\"radio\" value=\"".$row2->id."\" />";?></td>
<td width="145"><? echo "".$row2->antworten."";?></td>
</tr>
<?
}
?>
</table>
</td>
</tr>
<tr height="3"><td></td></tr>
<tr>
<td><input name="Submit" type="submit" class="input_feld2" value="Abstimmen"></td>
</tr>
</table>
</form>
<?
}
}
//
// POLL FORMULAR AUSGABE ENDE ODER ERGEBNISSE
////////////////////////////////////////////////
der css code steht wie oben in einer .css datei, diese wird dann einfach eingebunden.