I have a web site that gets a new page every couple weeks, and that means I need to update the menu to have the new page in every single one. I’m wondering if there is a way to have an external text or .htm file that I can basically insert into the web page. That way I can put the menu in the external file and call it wherever I want it. So I only have to edit one thing when I get a new page.
Thanks in advance.
Edit: This is a drop-down menu with ul and li tags with an external style sheet for them. So this needs to work for that too. Thanks
Have a single HTML page like so:
Then save it as
my_links.htmland into the page you want to insert it… do the following. Copy and paste the whole page and it asFILENAME.PHPand then use this code:Congratulations, you have just used PHP! Learn more about the including pages here.