<?php

include './conn.php';



$parent_cat = $_GET['strasse'];

header('Content-Type: text/html; charset=UTF-8');

mysql_query("SET NAMES 'utf8'");



$query = mysql_query("SELECT id,name FROM street WHERE zip_id = '{$parent_cat}' ORDER BY name");

if ($query === FALSE) {

    die(mysql_error()); // TODO: better error handling
}

echo '<option value="none">Strasse auswählen...</option>';

while ($row = mysql_fetch_array($query)) {

    echo "<option value='$row[id]'>$row[name]</option>";
}
?>