ShadowIce
05-01-2009, 12:11 PM
WHY wont this work?
Instead of displaying the zipcode, city, & state
and stuff, it says Array() :S
<?
$zmydb = mysql_connect("localhost", "root", "Pass") or die(mysql_error());
$mydb=mysql_select_db("weather") or die(mysql_error());
$blah = mysql_query("SELECT * FROM location WHERE city = zip_code") or die(mysql_error());
$info = mysql_fetch_array( $blah ) or die(mysql_error());
?>
<?echo "<select style=\"font-weight:bold;margin:0 0 0 0;padding:0 0 0 0;\" name=\"here\" id=\"here\"><option value=".$info.">".$info."</option></select>";?>
table name is location
column names:
local
zip_code
state_abreviation
latitude
longitude
city
state
thanks!
~Shadow~
Instead of displaying the zipcode, city, & state
and stuff, it says Array() :S
<?
$zmydb = mysql_connect("localhost", "root", "Pass") or die(mysql_error());
$mydb=mysql_select_db("weather") or die(mysql_error());
$blah = mysql_query("SELECT * FROM location WHERE city = zip_code") or die(mysql_error());
$info = mysql_fetch_array( $blah ) or die(mysql_error());
?>
<?echo "<select style=\"font-weight:bold;margin:0 0 0 0;padding:0 0 0 0;\" name=\"here\" id=\"here\"><option value=".$info.">".$info."</option></select>";?>
table name is location
column names:
local
zip_code
state_abreviation
latitude
longitude
city
state
thanks!
~Shadow~