<?php
	// Database Query to create artist list
	$artist_drop="select artistname from album order by artistname asc";
	$artist_drop_result=query_db($artist_drop);
	// Error checking of query
	if(!$artist_drop_result) error_message(sql_error());
	// Gets value for the loop from count query
	list($ad_count)=mysql_fetch_row($imagecount);

	// This loop used to create menu listing
	for($drop_count=0;$drop_count<$ad_count;$drop_count++)
	{
		list($artist)=mysql_fetch_row($artist_drop_result);
		// Checking for same artist as already loaded
		if($artist1 == $artist)
		{
			// Sets artist check variable
			$artist1 = $artist;
		}
		else
		{
			// Set the option field in menu
			echo "<option value = \"$artist\">$artist</option>";
			// Sets artist check variable
			$artist1 = $artist;
		}
	}
?>
	
