RE: [PHP] bold current menu item (fwd)

From: Date: Thu, 16 Aug 2001 18:20:00 +0000
Subject: RE: [PHP] bold current menu item (fwd)
Groups: php.general 
Request: Send a blank email to php-general+get-63087@lists.php.net to get a copy of this message
Another way you could do it would be to check each item in the $GLOBALS["argv"] variable (or $argv). - Dan -- ---------- Forwarded message ---------- Date: Thu, 16 Aug 2001 14:18:09 -0400 (EDT) From: Daniel Adams <danno@wpi.edu> To: Jason Dulberg <jdulberg@nas.net> Cc: huntsman@www.nisu.flinders.edu.au, php-general@lists.php.net Subject: RE: [PHP] bold current menu item I suppose you could check the $GLOBALS["REQUEST_URI"] variable with a regular expression or something. - Dan On Thu, 16 Aug 2001, Jason Dulberg wrote: > 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 (#63087) next »