well mainly the reason the people have not replied to your post and question as this is a really basic thing you should first learn when you are learning php. So some good advice would be atleast read the basics of the php manual or buy a good php beginners book and learn the basics.
Now for your question in this case your going to have to check the uri on every case it is changed. So your going to have to put it in a function and probably use a switch statement or a bunch of condition statements to match against the uri till ether you find the urls you are looking to match or not.
But sorry i could write the code for you but i feel this is one of those important times you should have a look at the php manual
actually i know a way but i thought it’s so primitive so i just wanted to ask about any new way, anyway i don’t need this function anymore cuz my main problem is now fixed using the include_once function so thanks guyz