Reply to Need some help with a dynamic menu bar

Your name:

Reply:


Posted by Martien van Wanrooij on 04/17/06 17:12

Hi all,

In order to avoid that in a menu bar a link that is already active, still
can be clicked I use the following function
function maakZoNodigLink($omschrijving, $verwijzing, $separator = "<br>\n")
{
$locatie = $_SERVER['PHP_SELF'];
if (strstr($locatie, $verwijzing)) //link to the
current page so no need to make it clickable
echo $omschrijving."$separator";
else echo ("<a class = \"menu\" href =
\"$verwijzing\">$omschrijving</a>$separator"); //a real link so it has to be
clickable
}

It works okay but I would like to make something similar when there are some
parameters involved like www.mysite.nl/mypage.php?item=3
an example is www.tapperijbeekendonk.nl where some pages are just separate
php files, however some activities are retrieved from a mysql database and
handled by a page called agenda.php . I would like that, when the
"Koninginnedag" page is active, the "Koninginnedag" link is not clickable. I
tried to find out in Google and in several php manuals how to retrieve both
the url and the part behind it (which starts with the question mark) I guess
it is one of the elements of the $_SERVER - array but unfortunately I
couldn't find it up to now.

Thanks for any help.

Martien.

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация