hello, i am building a website using mysql and php on an apache web server. The site has over 100 index pages for differnt parts and content of the site.
one of the problems i am having is i have to write the navigation bars in for each page, and there are more then 100 index's
At present i have two navigation bars a Main and a Side, I want the main to stay the same all the way thru the site, but i would like the Side to change depending on what parent site the user goes to.
currently i have written boths bars into each page which is becomming very tedious, so i would like to create a php include file which would collect the data from the data base and arrange the data on the site.
I have 3 databases. which are as follows
1. nav_main - id.......- main id - primary - auto increment
.................name.....- name of page
.................url_link.- link to page
.................url_img..- link to image which i want to be displayed and linked
2. nav_sub - sid......- sub id - primary - auto increment
..............pid......- parent id - linked with nav_main id
..............name.....- name of page
..............url_link.- link to page
..............url_img..- link to image which i want to be displayed and linked
3. nav_ssub - ssid.....- ssub id - primary - auto increment
..............spid.....- sub parent id - linked with nav_sub sid
..............name.....- name of page
..............url_link.- link to page
..............url_img..- link to image which i want to be displayed and linked
as i have said the database are relationed together for example
¦ssub...........................¦sub......................¦main..........
¦-------------------------------¦-------------------------¦--------------
¦programming.-.ssid:17.spid:4...¦computers.-.sid:4..pid:2.¦books..-..id:2
¦tips........-.ssid:2..spid:1...¦art.......-.sid:1..pid:2.¦books..-..id:2
¦lions.......-.ssid:20.spid:14..¦animals...-.sid:14.pid:3.¦images.-..id:3
above is an example of how i hope i have set it up =)
main stays the same across the top and sub is down the side but ssub would become visable down the side if a sub page is selected.
I hope i have explained this well enough. I am rather new to PHP and MYSQL, If anyone is able to advise me i would be greatful
Thanks in advance
Smiler89
--------------------------------------------------------------------------
Data should be free!
Information is organised data... so
Information should be free!
--------------------------------------------------------------------------