Hi,
I am redesigning a web site that is currently HTML and CSS.
The new site will be PHP, MySQL and CSS.
My question is: Is it common practice to delete my CSS navigation bar and replace it will a PHP driven navigation bar (constructed using data within the MySQL Database)?
Matt.
I’d imagine. Just put it in an SSI (aka PHP include). Is that what you mean?
CSS only styles a page. Though if you mean use PHP includes then obviously the database might be used to pull the markup for the ‘navigation menu’ rather than having a static one.
Well let me try and explain what I might try:
If the navigation bar included:
Home
Contact Us
About
Could it be designed so that if you click Contact Us it creates a submenu like
Home
Contact Us
Contact UK
Contact USA
Contact Africa
About
Furthermore since this navigation bar would be created using data from a MySQL Database could it ‘create itself’? Could the links for these pages be generated from the MySQL Database?
Previously, when designing navigation bars I have manually written the text for the links, manually added the link to the text and then used CSS to code the effect of the navigation bar. But I was wondering whether PHP can rule out the need to write the text and rule out the need to write the link for the text? This way, if I added to the database “Forum” then the navigation bar would include that also and also it’s link.
I would rather spend a week coding a navigation bar using a database than spend 10 minutes each time I add or delete something, which alters the navigation bar. Those 10 minutes soon add up!
Any ideas,
Matthew.