RE: [PHP] bold current menu item

From: Date: Thu, 16 Aug 2001 18:12:49 +0000
Subject: RE: [PHP] bold current menu item
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-63084@lists.php.net to get a copy of this message
The menu that's taken from the database is basically a list of links like this $s="select * FROM molds m, prodlookup p WHERE p.cid=$cid and p.pid=m.id ORDER BY p.pid"; $menu=mysql_query($s); while ($stuff = mysql_fetch_array($menu)) { extract($stuff); echo "<a href=\"?cid=$cid&id=$id&page=1\">".$title."</a><br>"; } So basically there could be an unlimited # of links depending on how many products there are. I'm guessing that before I echo the link, I need to evaluate whether $id is in the current URL. How would I go about doing that? Thanks for your time. __________________ Jason Dulberg Extreme MTB http://extreme.nas.net > On Thu, 16 Aug 2001 03:50, Jason Dulberg wrote: > > I am dynamically creating a menu based on a "title" field from a > > database. > > > > ie > > item1 > > item2 etc. > > > > Is it possible that when I'm on the "item1" page to bold the title in > > the menu? > > > > Any suggestions are appreciated. > > > > Presumably there is a corresponding filed for filename, or URL, or > somesusch? If so, just check whether the current script name matches, and > if so add the <STRONG> tags where needed. > > -- > David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc > CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA > > If at first you don't succeed, work for Microsoft. >

« previous php.general (#63084) next »