No worries guys i have figured it out using a radio button method, but i still get an extra table being generated
here is my code can anyone see why
<html>
<head>
<title>poo
</title>
</head>
<body>
<form action= "ticketype.php" method="post">
<?php
$categoryID=$_POST['categoryID'];
$color[0] = "red";
$color[1] = "green";
mysql_connect("localhost","phpuser","phpuser03") or die ("Database connection error");
mysql_select_db('booking');
$sql = "SELECT ticket.TicketType, ticket.Price, event.EventID FROM ticket,event WHERE event.EventID=ticket.EventID";
$result = mysql_query($sql);
#while ($row = mysql_fetch_array($result)) {
#echo $row['EventName'] . ',' . $row['Date'] . ',' . $row['Venue'] . "<br>\n";
echo "<table>\n";
echo " <tr>\n";
echo " <th><b>Ticket Type</b></th>\n";
echo " <th><b>Price</b></th>\n";
echo " <th><b>TicketID</b></th>\n";
echo " </tr>\n";
while ($row = mysql_fetch_array($result)) {
$a = ($a+1)%2;
echo '<tr bgcolor='.$color[$a] . ">\n";
#echo ' <td>'.$row['TicketType'].'</td>'."\n";
echo ' <td> <input name= "button" type="radio" value="adult" checked>Adult <input type="radio" name="button" value="child">Child</td>',$row['TicketType'],'</td>'."\n";
echo ' <td>'.$row['Price'].'</td>'."\n";
echo ' <td>'.$row['EventID'].'</td>'."\n";
echo ' </tr>'."\n";
}
echo '</table>';
?>
</form>
</body>
</html>