0) { $loc = mysql_fetch_assoc($res); $_SESSION['profile']['ccid'] = $loc['ccid']; $_SESSION['profile']['regid'] = $loc['regid']; $_SESSION['profile']['locid'] = $loc['id']; $query = "update `users` set `locid`='$loc[id]', `regid`='$loc[regid]', `ccid`='$loc[ccid]' where `id`='".$_SESSION['profile']['id']."'"; mysql_query($query); echo "

"._("Your location has been updated")."

\n"; } else { echo "

"._("I was unable to match your location with places in my database.")."

\n"; } } $query = "select `name` from `locations` where `id`='".$_SESSION['profile']['locid']."'"; $res = mysql_query($query); $loc = mysql_fetch_assoc($res); $query = "select `name` from `regions` where `id`='".$_SESSION['profile']['regid']."'"; $res = mysql_query($query); $reg = mysql_fetch_assoc($res); $query = "select `name` from `countries` where `id`='".$_SESSION['profile']['ccid']."'"; $res = mysql_query($query); $cc = mysql_fetch_assoc($res); ?>


Location: (hit enter to submit)