include("../scripts-styles/column_left.php"); ?>
|
|
$chosencity = $_GET['chosencity'];
$chosenzip = $_GET['chosenzip'];
include("../scripts-styles/opendatabase.php");
?>
if ($chosenzip) {
?>
$query = "select * from stops where stopzip = '$chosenzip' order by stopname";
$result = mysql_query($query);
$error = mysql_error($mysql_link);
print $error;
while ($row = mysql_fetch_array($result)) {
$stopid = $row['stopid'];
$stopname = $row['stopname'];
$stopaddress = $row['stopaddress'];
$stopcity = $row['stopcity'];
$stopzip = $row['stopzip'];
$stopcount++;
?>
= $stopname; ?>
[ Map It ]
= $stopaddress; ?>, = $stopcity; ?> = $stopzip; ?>
} ?>
} ?>
$query = "select stopcity from stops group by stopcity order by stopcity";
$result = mysql_query($query);
$error = mysql_error($mysql_link);
print $error;
while ($row = mysql_fetch_array($result)) {
$stopcity = $row['stopcity'];
$citylist[] = $stopcity;
}
?>
Choose a city and zip code...
foreach ($citylist as $val) { ?>
if ($val == $chosencity) { print " "; } ?>
= $val; ?>
if ($val == $chosencity) { print " (select a zip code)"; } ?>
if ($val == $chosencity) {
$query = "select stopzip from stops where stopcity = '$chosencity' group by stopzip order by stopzip";
$result = mysql_query($query);
$error = mysql_error($mysql_link);
print $error;
while ($row = mysql_fetch_array($result)) {
$stopzip = $row['stopzip'];
?>
• = $stopzip; ?>
} ?>
} ?>
} ?>
|
|
include("../scripts-styles/column_right.php"); ?> |