<?php

include './conn.php';

$parent_cat = $_GET['plz'];
header('Content-Type: text/html; charset=UTF-8');
mysql_query("SET NAMES 'utf8'");

$query = mysql_query("SELECT id,code,name FROM zip WHERE city_id = '{$parent_cat}'");
if ($query === FALSE) {
    die(mysql_error()); // TODO: better error handling
}
echo '<option value="">Plz auswählen...</option>';
while ($row = mysql_fetch_array($query)) {
    echo "<option value='$row[id]'>$row[code] - $row[name]</option>";
}
?>