<!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("poi.txt");
			echo "<div class='data'>\n";
			echo "<B><p class='menue'>Wie lautet die Webadresse eines gewählten Point of Interest?</p><br /></B>\n";
			
			if (array_key_exists('pois',$_GET)) {
				$pois = $_GET['pois'];
				
				$query = "SELECT website FROM pois WHERE name= '".$pois."'";
				$result = mysql_query($query) OR die("ERROR! ".mysql_error());
			
				if (mysql_num_rows($result) > 0) {
					echo "<p> Informationen zu <b>$pois </b>finden Sie auf folgender Website:</p><br />";
        				while ($row = mysql_fetch_row($result)) {
         
					echo $row[0];
          
					}
				} 
				echo "<br />";
				echo "<br />";
 
			}
			else { 
				echo "<B><br/><p class='submenue'>Bitte wählen Sie einen Point of Interest!</p></B>";
				}
   				$query = "SELECT name FROM pois";
				$result = mysql_query($query) OR die("ERROR! ".mysql_error());
					
					echo "<form method='get' action=''>";
					echo "<select name='pois' size='1'>";
					echo '<option value="_">Bitte wählen...</option>';
					while ($row = mysql_fetch_row($result)) {
					
					echo "<option value='".$row[0]."'>";
					echo $row[0];
					echo "</option>";
					}
					echo "</select>";       
					echo "<input type='submit' name='submit' value='Anzeigen'/>";
					echo "<input type='hidden' name='page' id='page' value='querys/query8'>";
					echo "<input type='hidden' name='nav' id='nav' value='subpages'>";
					echo "</form>";
		?>
	</body>
</html>
