hi i m new here....i wanna include menu in my each page....my web structure is new > main root dir for web having java menu files named head.php( i have used sothink menu generator java script to include menu in this php file, i have inluded java script in the head and body tag of this head.php file as told by the sothnik menu generator) 1 > first folder 2 > 2nd folder and so on ..... my all web files in php arein main folder....... i ha if i include head.php in my php page in main folder using include, it includes ok and works ok ....but suppose my php page in any other folder like in 1 folder here, then inluding head.php give no menu in the page.....plz tell me how to do it............
Use absolute referencing in the menu for pages Like yoursitename.com/abc.php instead of abc.php Will solve your problem Regards Alex
but still it does not include the menu........... i think the link in the .js file are relative, so they are not included .......... so i have changed the relative paths to absolute paths....now all the menu is included but there is another problem now.......it is showing the menu but the links in the menu go to other addresses which does not exist.......for example...... i have main.php and head.php containing my main page code and menu respectively in root dir ( root is my main root dir for web).... main.php > main page data except menu head.php > menu items... main.php file look like as <?php include "head.php"; ----- ---- ?> head.php <?php ---- <head>< type=css/text javascript .....></head> <title>aaa</title> <body> here is the java code supplied by the sothink menu generator...and in this, i have made the relative addresses absolutee addresses...... </body> but now i have folder 1 in this main dir....i have profile.php file here which looks like this <?php include "../head.php"; ----- some links here.... ---- ---- ?> whenever i clik on the link in this page, it searches for the file with address "//localhost/1/profile.php" which does not exist.....since the page in the main dir...... and whenever i click in the main page for profile.php, it work fine since it looks for the file //localhost/profile.php so tell me wat to do....... tanks in advance.....