I know it's such a basic thing, but a google search hasn't shown me how to resort the rows after clicking the 'th' links.
I've got this:
<table border="1">
<tr>
<th>Type:</th>
<th>Description:</th>
<th>Recorded Date:</th>
<th>Added Date:</th>
</tr>
<?php
while($row = mysql_fetch_array($result)){
?>
<tr>
<td><?php echo $row['type'] ?></td>
<td><?php echo $row['description'] ?></td>
<td><?php echo $row['recorded_date'] ?></td>
<td><?php echo $row['added_date'] ?></td>
</tr>
<br />
<?php
}
mysql_close();
?>
</table>
I need to be able to click 'type' and sort alphabetically, and click on either 'Recorded Date' or 'Added Date' and sort by date. I see I need to have the mySql queries do this, but do I set them up as conditionals with the a href's or what? Thanks!