mcc_22ri Posted November 11, 2010 Share Posted November 11, 2010 Right now I'm feeling like a little baby novice asking a ridiculiously simple question but I just can't find a solution to it! So here it goes.... please don't laugh!!! How do I create a menu which doesn't have to be changed on every existing page whenever I need to add a new page? See... novice stuff and I know it can be done in Dreamweaver. I have Dreamweaver software (old version) but how would I write the code to do so ? Thank you everyone. Link to comment https://forums.phpfreaks.com/topic/218349-menus/ Share on other sites More sharing options...
ngreenwood6 Posted November 11, 2010 Share Posted November 11, 2010 Well if you are asking this question I am going to assume that you do not have a very much experience with php. What you can do is create and "include" that will allow you to have it in one page where you can edit it and it will update on all of the other pages. Here is an example: menu.php <a href="something.php">Something</a> <a href="something_else.php">Something Else</a> home.php <div>Some Data Here</div> <?php include('menu.php'); ?> <div>Other Data Here</div> other.php <div>Some Data Here</div> <?php include('menu.php'); ?> <div>Other Data Here</div> Then you only have to update menu.php whenever you need it changed on all of those pages. Hopefully that will make sense to you. Also in order to do this you will need php on your server. Link to comment https://forums.phpfreaks.com/topic/218349-menus/#findComment-1132885 Share on other sites More sharing options...
mcc_22ri Posted November 11, 2010 Author Share Posted November 11, 2010 Thank you. I'm downloading php on my server now. I'll give the code a shot in a few mins. Link to comment https://forums.phpfreaks.com/topic/218349-menus/#findComment-1132891 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.