--- inc/conn.inc 2001/03/03 12:56:37 1.5 +++ inc/conn.inc 2001/03/05 15:16:50 1.6 @@ -9,8 +9,14 @@ exit; } - $url=basename($PHP_SELF)."?$QUERY_STRING"; - $sth = $dbh->prepare("select item from menu where url = '$url'"); + $sql_section=""; + + $url=basename($PHP_SELF); + if ($QUERY_STRING) $url.="?$QUERY_STRING"; + + if ($section) $sql_section=" and section='$section'"; + + $sth = $dbh->prepare("select item from menu where url = '$url' $sql_section limit 1"); $sth->execute(); global $menu_item; if ($row=$sth->fetchrow_hash()) {