All of a sudden, the script below has stopped working, it worked
up until this morning, just fine.
$division = $_GET["division"];
foreach($division as $div)
{
if($div=="all")
{
$i = 1;
}
}
if($i==1)
{
buildaustin($db);
buildcapitol($db);
buildlonestar($db);
buildmabl($db);
buildtexas($db);
} else {
foreach($division as $div)
{
switch ($div) {
case "austin":
buildaustin($db);
break;
case "capitol":
buildcapitol($db);
break;
case "lonestar":
buildlonestar($db);
break;
case "mabl":
buildmabl($db);
break;
case "texas":
buildtexas($db);
break;
default:
break;
}
$div = '';
}
}
Here is the HTML that calls it:
<form name="ticker" action="buildtickerfiles.php" method="get">
<select name="division[]" size="6" multiple="true">
<option value="all">All</option>
<option value="austin">Austin</option>
<option value="capitol">CAP</option>
<option value="lonestar">LS</option>
<option value="mabl">MABL</option>
<option value="texas">Texas</option>
</select><br />
<input type="checkbox" name="LW" value="1">Lst Week<br />
<input type="submit" name="Submit" value="Build Ticker Files">
</form>
No errors and no output, as in each of the routines called
in the switch, I something do this:
// $db is a database support class
if ($db->num_rows($result) > 0 ) {
echo "Done...Austin\n";
} else {
echo "Done...No games to report for Austin\n\n";
}
If I echo the results of the $division array like this:
foreach($division as $div)
{
echo $div;
}
I get this output, when I select the first 3 options (not All):
ArrayArrayArray
Before it stopped working I got:
Done…Austin
Done…Capitol
Done…Lone Star
Here's my URL for this GET:
buildtickerfiles.php?division%5B%5D=austin&division%5B%5D=capitol&division%5B%5D=lonestar&Submit=Build+Ticker+Files