473,407 Members | 2,320 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Need some help with a dynamic menu bar

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.
Apr 17 '06 #1
2 1379
$_SERVER['REQUEST_URI']

Apr 17 '06 #2
"Sjoerd" <sj******@gmail.com> schreef in bericht
news:11**********************@g10g2000cwb.googlegr oups.com...
$_SERVER['REQUEST_URI']

Thank you Sjoerd, but when I replaced the PHP_SELF with REQUEST_URI the
function didn't work with anymore menu items at all. I did a quick test with
echo $_SERVER['PHP_SELF'] which returned the actual php file preceded by a
slash, but echo $_SERVER['REQUEST_URI'] didn't return anything at all.
Could you still give me a hint? I must say that I am not very familiar with
settings like php.ini maybe it has to do something with that?

Martien.
Apr 17 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Woody Splawn | last post by:
For reasons I have not yet identified I am having problems with the help system in VS.net 2003. It seems as though it was working all right in the past but it's not now. First of all I can't seem...
3
by: P Wolpert | last post by:
This is my first post. I hope I don't sound stupid. I have a script conflict when I put two scripts on one page. Both scripts will work if I use one at a time but the menu button script will not...
33
by: Todd | last post by:
OK, I created a .htm page within a new Web solution: -------------------------------------------------------- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head>...
2
by: vikram | last post by:
I have to design a page which contains a dynamic generated menu at left side.Menu will be generated once a user log in and will remain as it is for the rest of the user session. Problem is that...
0
by: benfly08 | last post by:
Hi, I used SWT to develop an windows application. In the application there is a dynamic created popup menu. The dynamic part is that i will pass a list of name to be a submenu of one menu item....
1
by: bhosalevivek | last post by:
I did this code from Dynamic Drive DHTML. it's working properly, but now I need submenu for "Submenu 1.2", means when I take mouse on "Submenu 1.2" I need to display "Submenu 1.2.1". I try to do...
3
by: =?ISO-8859-1?Q?Jo=E3o_Maia?= | last post by:
Hi there, I am having a weird problem in trying to use a ASP.NET menu inside a custom web part. I am developing a custom web part that has a menu inside (just the menu, nothing else). The menu...
0
by: richard12345 | last post by:
Hi Guys I have problem with site I am building. The sidebar with menu and other thinks is overlapping footer. The footer move with the content and but it dos it dos not move with the sidebar. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.