I have a website that displays the titles of TV shows, ordered by season. I'd like to implement a UI where the user is able to switch between seasons of a show by switching tabs For example, the "Season 1" tab would show the titles of all the shows from the first season, the "Season 2" tab would show the titles of all the shows from the second season, etc. The DB is structured as an episodes table with title, show_id (id of the TV show), and sezon(season number).
<div class="demo" id="tabs">
<ul>
<?$season=mysql_query("select * from seasons where showid='$ids' ORDER BY sezon ASC");
while($szn=mysql_fetch_array($season)){?>
<li><a href="#tabs-<?=$szn['sezon'];?>">Season <?=$szn['sezon'];?></a></li>
<?}?>
</ul>
<div id="tabs-<?=$szn['sezon'];?>">episodetitle</div>
</div>
How can I implement the tab switching correctly?