yep, i did have a look at that before i first posted but couldnt work it out. now that you have forced me into looking further

would i do something like this or is other coding needed to set "case"
PHP Code:
//############### start advertising / sponsorship banner #############
case 'store':
$userinfo[where] = "$filename";
break;
$showad = $DB_site->query_first("SELECT * FROM ads WHERE pagename='$filename'");
if (empty($showad[forumidnum])) {
$randomad=$DB_site->query("SELECT * FROM ads ORDER BY RAND() desc LIMIT 1");
eval("\$showthisad .= \"".gettemplate("ads_bannerbank")."\";");
} else {
eval("\$showthisad .= \"".gettemplate("ads_forum_sponsor")."\";");
}