Sætte dette op i 2 rækker
Hej.Er der en venlig sjæl som kan sætte dataene på denne side i 2 rækker, dataene består af en afkrydsningsboks til venstre og navn til højre.
Start:
<?php
if (!isset($_SESSION['email'])){
include('../db.php');
}
//include('../db.php');
$sqll = "SELECT * FROM polls WHERE email='$_SESSION[email]' ORDER BY name ASC";
$resultl = mysql_query($sqll);
$number = mysql_num_rows($resultl);
if (!isset($_GET['poll_text'])){
if (!isset($poll_text)) {
echo"
Hvilken afstemning vil du se?<table>";
for ($r = 0; $r < $number; $r++){
$poll = mysql_fetch_assoc($resultl);
echo '<tr><td>
<a href="'.$_SERVER[PHP_SELF].'?poll=view&poll_text='.$poll['id'].'">'.$poll['name'].'</a></td></tr>';
}
echo"</table> <a href=\"logged.php\">Tilbage til hovedsiden</a>";
}
}
else{
$code = $_GET['poll_text'];
$sql = mysql_query("SELECT * FROM poll_option WHERE id='$code' ORDER BY idnum ASC");
$sqls = mysql_query("SELECT * FROM polls WHERE id='$code' ORDER BY name ASC");
$polls = mysql_fetch_assoc($sqls);
if (!$polls){
echo'<h2>Error</h2>
This poll doesn\'t exist. It may have been deleted<br>';
}
else{
$numbers = mysql_num_rows($sql);
echo "<b>".$polls['name']."</b><br><b>".$polls['question']."</b><br>";
echo '
<form action="'.$poll_url.'includes/poll/vote.php?poll_num='.$polls['id'].'" method="post">';
$lett = 1;
for ($e = 0; $e < $numbers; $e++){
$rows = mysql_fetch_assoc($sql);
echo '<input type="radio" name="poll'.$rows["id"].'" value="'.$rows["option"].'"> '.$rows["option"].'<br>';
$lett++;
}
echo '
<br>
<input type="submit" name="submit" value="Vote!">
</form>';
}
if(isset($_SESSION['email'])){
echo'
<a href="logged.php">Tilbage til hovedsiden</a>';
}
echo "<div class=\"powered\"><p>Powered By <a href=\"$poll_url\">$poll_url</a></p></div>";
}
?>
På forhånd tak.