I have a JavaScript menu that looks something like this:

PHP Code:
<form>
<
select name="select" onChange='MM_jumpMenu('parent',this,0)">
<option selected>Select a Country</option>
<option value="/World">World</option>
<option value="/United_States">United States</option>
<option value="/Mexico">Mexico</option>
[etc.]
</select>
</form> 
It lists over 200 place names, and I'd like to replace the entire list with a PHP query that displays the same names drawn from a database table. So I'm trying to figure out how to do this.

My page more or less begins with this script:

PHP Code:
$result mysql_query("SELECT URL FROM gw_geog_gw WHERE URL = '$MyName'"$link);

$num_rows mysql_num_rows($result); 
Farther down is this query:

PHP Code:
$CIA mysql_fetch_assoc(mysql_query("SELECT *
FROM cia_ids CI
LEFT JOIN gw_geog_gw GGG ON GGG.IDArea = CI.ID_Name
LEFT JOIN cia_names CN ON CN.ID_Name = CI.ID_Name
LEFT JOIN cia_background CB ON CB.ID_Name = CI.ID_Name
LEFT JOIN cia_ppl CP ON CP.ID_Name = CI.ID_Name
WHERE GGG.URL = '
$MyURL'")) 
Later, a file with the JavaScript menu is included. So if I'm viewing, say, MySite/France, I could display "France" with the following echo statement:

PHP Code:
echo $CIA['GGG.Area']; 
...or something like that.

But I don't know how to write a script that spits out a list of all the place names...unless I start from scratch and just write a new query. Is this the best way to go?

Another possibility I thought of is to insert some sort of script just under the query I referenced above:

PHP Code:
$CIA mysql_fetch_assoc(mysql_query("SELECT *
FROM cia_ids CI
LEFT JOIN gw_geog_gw GGG ON GGG.IDArea = CI.ID_Name
LEFT JOIN cia_names CN ON CN.ID_Name = CI.ID_Name
LEFT JOIN cia_background CB ON CB.ID_Name = CI.ID_Name
LEFT JOIN cia_ppl CP ON CP.ID_Name = CI.ID_Name
WHERE GGG.URL = '
$MyURL'"))

[
Insert some sort of query that lists all place names...] 
I could then somehow echo the new script inside the JavaScript form.

Thanks.