Location: PHPKode > projects > Tetravex oggserv > oggserv/albums.php
<?
//albums.php for tetravex oggserv by Edd Barrett

include "header.php";
include "back/conf.php";

//read the query string
$artist=$_GET['artist'];


//get the albums
$sql="SELECT album_name FROM oggserv_media WHERE artist='$artist' ORDER BY album_name ASC";
$result=mysql_query($sql,$link);

$output="<table cellspacing=\"3\" cellpadding=\"3\">";

while($row=mysql_fetch_array($result)){
	$album=$row['album_name'];
	
	//no itteration plz!
	if($album!=$prev){
		$output.="<tr bgcolor=\"3c4e9e\"><td><a href=\"tracks.php?album=$album\"> $album </a></td></tr>";
	}
	
	$prev=$album;

}

$output.="</table>";

//outut the list
echo "<center><b>Albums By $artist</b><br><br>$output</center>";

include "footer.php";

?>
</body>
</html>
Return current item: Tetravex oggserv