Hopefully this is a fairly simple question. I have a page that shows a table that derives its data from an MySQL db. I want to be able to vary the column widths individually but I am have trouble getting the right syntax. Can anyone show me how to change the width say of the column Event? The code for this part of the page is:
$table = "<form method=post><table border=\"1\" cellspacing=\"10\" body bgcolor=\"#AABBCC\" Align=Center>\n";
$tableHead = "<tr>
<th>Event</th>
<th>Start Time</th>
<th>End Time</th>
<th>Date</th>
<th>Member</th>
<th>Financial Year
<select name='year' onchange='form.submit();'>
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
<option>2020</option>
</select>
</th>
</tr>\n";
$tableHead = str_replace("<option>$year</option>","<option selected>$year</option>",$tableHead);
while($row = mysql_fetch_array($result)){
$tablerow .= "<tr>
<td>".$row['EventName']."</td>
<td>".$row['StartTime']."</td>
<td>".$row['EndTime']."</td>
<td>".$row['EventDate']."</td>
<td>".$row['Member']."</td>
<td>".$row['financialyear']."</td>
</tr>\n";
}
$tableEnd = "</table></form>\n";
?>
$table = "<form method=post><table border=\"1\" cellspacing=\"10\" body bgcolor=\"#AABBCC\" Align=Center>\n";
$tableHead = "<tr>
<th>Event</th>
<th>Start Time</th>
<th>End Time</th>
<th>Date</th>
<th>Member</th>
<th>Financial Year
<select name='year' onchange='form.submit();'>
<option>2010</option>
<option>2011</option>
<option>2012</option>
<option>2013</option>
<option>2014</option>
<option>2015</option>
<option>2016</option>
<option>2017</option>
<option>2018</option>
<option>2019</option>
<option>2020</option>
</select>
</th>
</tr>\n";
$tableHead = str_replace("<option>$year</option>","<option selected>$year</option>",$tableHead);
while($row = mysql_fetch_array($result)){
$tablerow .= "<tr>
<td>".$row['EventName']."</td>
<td>".$row['StartTime']."</td>
<td>".$row['EndTime']."</td>
<td>".$row['EventDate']."</td>
<td>".$row['Member']."</td>
<td>".$row['financialyear']."</td>
</tr>\n";
}
$tableEnd = "</table></form>\n";
?>