Display student list in separated table according to year of study(need help)

Hello there,

I am currently developing an database system for student. And now, I am thinking to alter a little bit on my system flow but encountering some problem. Originally, list of student of the particular year will be accessed by clicking the link as below.

code:


<table width="818" border="0" align="center" cellpadding="0" cellspacing="0">
<tr align="center">
<td height="23"><strong style="font-size: 14px; color: #E0FFFF;">Student List</strong></td>
</tr>
<tr>
<td height="32"></td>
</tr>
</table>
<!-- Mentee List Title -->
<!-- Mentee List Table -->
<table width="200" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="22" align="center">
<strong><a href="manage_lecturer.php?id=lect&amp;lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;y=year&amp;year=1" style="color:#FFFFFF; font-size: 13px;">Year 1</a></strong>
</td>
</tr>
<tr>
<td height="22" align="center">
<strong><a href="manage_lecturer.php?id=lect&amp;lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;y=year&amp;year=2" style="color:#FFFFFF; font-size: 13px;">Year 2</a></strong></td>
</tr>
<tr>
<td height="22" align="center">
<strong><a href="manage_lecturer.php?id=lect&amp;lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;y=year&amp;year=3"  style="color:#FFFFFF; font-size: 13px;">Year 3</a></strong>
</td>
</tr>
<tr>
<td height="22" align="center">
<strong><a href="manage_lecturer.php?id=lect&amp;lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;y=year&amp;year=4" style="color:#FFFFFF; font-size: 13px;">Year 4</a></strong>
</td>
</tr>
<tr>
<td height="22" align="center">
<strong><a href="manage_lecturer.php?id=lect&amp;lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;y=year&amp;year=5" style="color:#FFFFFF; font-size: 13px;">Year 5</a></strong>
</td>
</tr>
<tr>
<td height="52"></td>
</tr>
</table>

This is the table shown when clicking the link of ‘Year 1’

code:


<?php  }else if(isset($_REQUEST['y']) && ($_REQUEST['y']== 'year')) { ?>
<table width="818" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- Mentee List Title -->
<tr align="center">
<td height="23"><strong style="font-size: 14px; color: #E0FFFF;">Student List - Year <?php echo $_REQUEST['year'];?></strong></td>
</tr>
<tr>
<td height="31" align="right">
<strong><a href="manage_lecturer.php?lect_id=<?php echo $row_lecturer['lect_id']; ?>&amp;id=lect"><img src="image/button_back1.gif" border="0" align="top" /></a></strong>
</td>
</tr>
</table>

But now, I want to display all the student in one click but students are in separated table according to year of study. How to correct it?Please guide.