SpyderMonkey Posted July 31, 2007 Share Posted July 31, 2007 I am trying to add the user's own location/cityname to index.php and have gotten real close to making it work, but it seems I am missing some small bit. I can get "Location:" to appear, but the cityname never shows up. I know there is just a small thing I am missing but can't identify exactly what is missing. The line is written: print "Location: {$ir['cityname']}"; I know the missing part is the call to cityname. Any help is greatly appreciated. Quote Link to comment Share on other sites More sharing options...
John99 Posted July 31, 2007 Share Posted July 31, 2007 Re: Adding user city/location to index.php ok just done this simple for you : $query = mysql_query("SELECT * FROM `cities` WHERE `cityid` = '".$ir["location"]."'"); $result = mysql_fetch_array($query); $location = $result["cityname"]; And then were you want it printed in index/ header Location: $location Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.