Hi guys I'm in the process of building a Physics school website but I'm stuck at the moment. I need to create hyperlinks at the top of the page that will jump to the section of the page where the alphabet the user has clicked on begins. Here is my code so far.
I've successfully been able to create individual groupings for each letter. But how do I create hyperlinks at the top of the page linking to each grouping to to facilitate overall usabilty.
Much thanks in advance.
CODE
<span class="body">Use the search feature if you are looking for something specific.</span><p>
<form action="" method="post"><input name="" type="text" style="background: #fffff;border: 1px solid #c3c3c3; width: 200px;"/> 
<input name="" type="button" value="Search!"/></form>
<table width="100%" cellspacing="0" cellpadding="0">
<?
$sql = "SELECT * FROM tbl_topics ORDER BY title ASC";
$results = mysql_query($sql);
$letter = '';
while( $row = mysql_fetch_assoc($results) ) {
if( $letter !== strtoupper($row['title'][0]) ) {
$letter = strtoupper($row['title'][0]);
echo '<tr><td><img src="../img/spacer.gif" height="10px"></td></tr>' . '<tr><td class="subheading2" style="border-bottom: #333333 inset 1px; padding-bottom: 5px;">' . $letter, '</tr></td>';
}
echo '<tr><td class="body2" style="border-bottom: #999999 inset 1px; padding-top:5px; padding-bottom: 5px;">' . '<img src="../img/topics.gif"/> ' . '<a href="#">' . $row['title'], '</a>' . ' ' . '<span class="body4"> @ ' . $row['date'] . ' ' . $row['time'] . ' in ' . $row['category'] .'</span>' . '</td></tr>';
}
?>
</table>