I am working on a gaming script to use for a league. I have a campaign with a map assigned to it with many territories assigned to the map.
Here is an idea.

I have a page I'm working on to update the map and change ownership, or "Army of Occupation" for each territory. Can't seem to figure this out.
I need an array to compare my Territory ID (tid) to occupiers (Allied, Axis or Neutral) for each territory. My php table will list all territories for that map and each record will have three radio buttons for me to select who occupies that territory.
Here is what I have so far.
// Load Territories
$mapstatus = array();
$sql = "SELECT occupiers FROM " . $prefix . "_eto_territories WHERE mid ='$mid'";
$result = $db->sql_query($sql);
while ( $row = $db->sql_fetchrow($result) ) {
$tid = $row["tid"];
$occupiers = stripslashes($row['occupiers']);
$mapstatus[] = array("tid" => $tid, "occupiers" => $occupiers);
}
foreach($mapstatus as $territory){
$tid = $territory["tid"];
$axischecked = "";
$alliedchecked = "";
$neutralchecked = "";
if ($mapstatus[$tid] == "Allies") { $alliedchecked = "CHECKED"; }
else if ($mapstatus[$tid] == "Axis") { $axischecked = "CHECKED"; }
else { $neutralchecked = "CHECKED"; }
echo "<td align=\"center\" bgcolor=\"#666666\" width=\"45%\">"
."<INPUT TYPE=\"RADIO\" NAME=\"mapstatus\" $tid VALUE=\"Allies\" $alliedchecked><font color=\"#000000\"> Allies </INPUT>"
."<INPUT TYPE=\"RADIO\" NAME=\"mapstatus\" $tid VALUE=\"Axis\" $axischecked><font color=\"#000000\"> Axis </INPUT>"
."<INPUT TYPE=\"RADIO\" NAME=\"mapstatus\" $tid VALUE=\"Neutral\" $neutralchecked><font color=\"#000000\"> Neutral </INPUT>"
."</td>"
. "</tr>";
}
Here is a screenshot of what appears in my table.

I am not getting any records coming back cept for the first one.
Any help with this will be mucho appreciated.