Half a day later and (I think) I got it! Whew!
PHP Code:
<?php

//this pulls the variables from the flash movie when the user
//hits submit.  
$from $_POST ['from'];
$to $POST ['to'];

//connect to the database
  
$host "";
  
$user "";
  
$pass "";
  
$database "";

$db_connect mysql_connect($host$user$pass) or die (mysql_error());
$db_select mysql_select_db($database$db_connect) or die (mysql_error());

$query "SELECT * FROM takensquares WHERE id BETWEEN '$from' AND '$to' AND taken = 1";
$result mysql_query($query) or die(mysql_error());

// count rows of array
$num mysql_numrows($result);

// loop through results of array and print to screen
$i=0;
while (
$i $num) {
$id=mysql_result($result,$i,"id");
echo 
$id,",";
$i++;
}
?>
This outputs the results in the following format: 1,25,298,466
Is this the way they should be output for what I'm trying to achieve (ie: separated by commas?).

Just a "yes" or "no" would be a nice confirmation