Hi,
Thanks for the suggestions.
I ended up getting around the flash part of this question by using LoadVariables.
There's one more thing holding me back - flash requires that the output is formatted like
var1=value1&var2=value2 etc...
For testing, I had set this up using
// count instances of each region in each table
$query = 'SELECT COUNT(*) FROM `infrastructure` WHERE `Region_Id` = 1';
$result = mysql_query($query) or die('Sorry, we could not count the number of results: ' . mysql_error());
$inf1 = mysql_result($result, 0);
// echo the variables
print "&inf1=$inf1";
I'm assuming there's an easier way to do this for all regions than to repeat that block of code for each one. I've set up a loop as follows, which echoes the variables for region 1 as many times as there are regions (as I expected).
mysql_select_db($database_ernact, $ernact);
$query_getRegions = "SELECT Region_Id FROM regions";
$getRegions = mysql_query($query_getRegions, $ernact) or die(mysql_error());
$row_getRegions = mysql_fetch_array($getRegions);
$totalRows_getRegions = mysql_num_rows($getRegions);
while ($row_getRegions = mysql_fetch_array($getRegions)) {
// count instances of each region in each table
$query = 'SELECT COUNT(*) FROM `infrastructure` WHERE `Region_Id` = 1';
$result = mysql_query($query) or die('Sorry, we could not count the number of results: ' . mysql_error());
$inf1 = mysql_result($result, 0);
// echo the variables
print "&inf1=$inf1";
}
So what I'm looking to do is replace the number 1 with the region id each time the loop is executed.
Thanks again for the help guys, and sorry for being such a n00b!