\n";
echo ("\n");
echo ("Click on the artists' names to learn more about them.
\n");
$query_artist = "SELECT artist,id FROM artist order by artist";
$result_artist = pg_Exec ($dbconn, $query_artist) or die ("Query failed");
echo ("\n");
for ($i = 0; $artist = pg_Fetch_row ($result_artist); $i++) {
$url = urlencode ($artist[0]);
echo ("- $artist[0]
\n");
$query_album = ("select title from album where artist_id=$artist[1]");
$result_album = pg_Exec ($dbconn, $query_album) or die ("Query failed");
for ($j = 0; $album = pg_Fetch_row ($result_album); $j++) {
echo ("- $album[0]
");
};
echo ("
\n");
};
echo ("
\n");
require ("footer.inc.php");
?>