Got it after looking at so much stuff trying to figure it out.
PHP Code:
$games = $DB_site->query("
SELECT *
FROM clan_game
ORDER BY displayorder
");
$gameinfo = array();
while ($game = $DB_site->fetch_array($games))
{
$varname = "game_$game[gameid]";
$game['varname'] = $varname;
$gameinfo[] = $game;
if (isset($_REQUEST["$varname"]))
{
$value = &$_REQUEST["$varname"];
}
else
{
$value = '';
}
}
PHP Code:
unset($gamejoin);
foreach ($gameinfo AS $index => $value)
{
if ($application["$value[varname]"] == 1)
{
$gamenames = $DB_site->query("
SELECT *
FROM clan_game
WHERE gameid = " . $value['gameid'] . "
");
$gamename = $DB_site->fetch_array($gamenames);
$gamejoin .= "" . $gamename['game'] . "<br />";
}
else
{
$gamejoin = ' ';
}
}