<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

	<head>
	
		<title>Los Angeles Stadt der Engel</title>
		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
		<link rel='stylesheet' media='all' type="text/css" href="stylesheet.css" />
		<style type="text/css"></style>

	</head>
	
	<body>
	
		<?php 
			require_once("db_connection.php");
			require_once("ml.txt");

			echo "<div class='data'>\n";
			echo "<B><p class='menue'>Welche Farbe hat welche Linie?</p><br /></B>\n";
			echo "<table>\n";
			echo "<tr><th>Liniennummer</th><th>Farbe</th><th>Name der Farbe</th></tr>\n";
			$query = "SELECT id, color, hexcolor FROM routes";
			$sth = mysql_query($query) OR die("Fehler: ". mysql_error());
			while ($object = mysql_fetch_object($sth)) {
				echo "\t<tr><td>$object->id</td><td style='background-color:$object->hexcolor'></td><td>$object->color</td></tr>\n";
			}
			echo "</table>\n";
			echo "</div>\n";
			mysql_free_result($sth);
			mysql_close($db);
		?>

	</body>
</html>