include "./definitions.inc";
include "./common.inc";
include "./common_db.inc";?>
$GLOBALS[owner] = "Bluecherry Internet Services, Inc";?>
page_header(); ?>
echo format_date(); echo "
"; ?>
$longline->insert();?>
$link_id = db_connect(); ?>
if ($latlong == "true" and $pop == "true"){
$result = mysql_query("select zipcode, longitude, latitude, population,
States.state, City.city
from Zipdata, States, City
where Zipdata.stateid=States.stateid
and Zipdata.cityid=City.cityid
and City.city='$Cityname'
order by zipcode", $link_id);
echo mysql_error() . "
";
echo "
";
while ((list($zipcode, $long, $lat, $pop, $state, $city) = mysql_fetch_row($result)))
{
echo "";
echo " $city | ";
echo "$state | ";
echo " $zipcode | ";
echo " $lat | ";
echo " $long | ";
echo " $pop | ";
echo "
";
}
}
elseif ($latlong == "true" and $pop == ""){
$result = mysql_query("select zipcode, longitude, latitude,
States.state, City.city
from Zipdata, States, City
where Zipdata.stateid=States.stateid
and Zipdata.cityid=City.cityid
and City.city='$Cityname'
order by zipcode", $link_id);
echo mysql_error() . "
";
echo "";
while ((list($zipcode, $long, $lat, $state, $city) = mysql_fetch_row($result)))
{
echo "";
echo " $city | ";
echo "$state | ";
echo " $zipcode | ";
echo " $lat | ";
echo " $long | ";
echo "
";
}
}
elseif ($latlong == "" and $pop == "true"){
$result = mysql_query("select zipcode, population,
States.state, City.city
from Zipdata, States, City
where Zipdata.stateid=States.stateid
and Zipdata.cityid=City.cityid
and City.city='$Cityname'
order by zipcode", $link_id);
echo mysql_error() . "
";
echo "";
while ((list($zipcode, $pop, $state, $city) = mysql_fetch_row($result)))
{
echo "";
echo " $city | ";
echo "$state | ";
echo " $zipcode | ";
echo " $pop | ";
echo "
";
}
}
else {
$result = mysql_query("select zipcode, States.state, City.city
from Zipdata, States, City
where Zipdata.stateid=States.stateid
and Zipdata.cityid=City.cityid
and City.city='$Cityname'
order by zipcode", $link_id);
echo mysql_error() . "
";
echo "";
while ((list($zipcode, $state, $city) = mysql_fetch_row($result)))
{
echo "";
echo " $city | ";
echo "$state | ";
echo " $zipcode | ";
echo "
";
}
}
echo "
";
?>
$longline->insert(); ?>
echo "
"; ?>
page_footer(); ?>