I am writing this off the top of my head, so dont expect it to work. But it should give you a starting point:
PHP Code:
// usage of globalize():
if ($_REQUEST['siteid'])
{
globalize($_REQUEST, array(
'siteid' => INT // if you want site id to be integer only, else remove the "=> INT"
));
$getgames = $DB_site->query("SELECT * FROM site_game_info WHERE siteid='$siteid'");
// we can use "$siteid" here because globalize makes it a global variable.
if(!$getgames) // it is false (i.e SQL returns no rows)
{
standard_error('There are no sites with the ID you have entered, pelase try another ID.');
die; //to avoid having it execute the rest of the script
}
else
{
while($game = $DB_site->fetch_array($getgames))
{
//call bbcodeparse.php to parse bbcode within overview and requirements fields
require_once('./includes/functions_bbcodeparse.php');
$game['overview'] = parse_bbcode2($game['overview'], 1, 1, 1, 1);
$game['rec_sys_req'] = parse_bbcode2($game['rec_sys_req'], 1, 1, 1, 1);
$game['min_sys_req'] = parse_bbcode2($game['min_sys_req'], 1, 1, 1, 1);
eval('$games .= "' . fetch_template('gamedetail') . '";');
}
}
}
Hope this helps
//peace