1. This website uses cookies. By continuing to use this website you are giving consent to cookies being used.
    For information on cookies and how you can disable them visit our Cookie Usage page.
    Dismiss Notice

PHP Adding Menus to CSS?

Discussion in 'Web Development' started by TemplateUser, Jul 16, 2007.

  1. TemplateUser

    TemplateUser New Member

    Is there a way you can add a menu to a CSS? I really hate going into each individual page and editing it and making it something else. If there is could someone tell me?
     
  2. Scoooooty

    Scoooooty Member

    Yer thats a big problem with just basic html templates, you have to go through each page updating links ect when you make changes.

    One way of doing it is to use an "include" command which just loads a section onto you page from an external file, this way you can just edit the 1 external file to make changes to the whole website.

    Here is a tutorial http://www.tizag.com/phpT/include.php

    Its good for menus
     
  3. TemplateUser

    TemplateUser New Member

    THANK YOU SO MUCH! That's what I've been looking for for like A BILLION YEARS! Thanks! I really REALLY appreciate this ;) You're my best friend forever.
     
  4. mcironlung

    mcironlung New Member

    So when using .php files you have to do something with SQL or MySQL right? Or can the .php files just be uploaded like html? I just wrote a post today about having a latest news section update on everypage without editing each .html page (which is tedious). This appears to be the solution, so far.

    Thanks.
     
  5. kalnera

    kalnera New Member

    java code

    You can also use the java code to do the same thing. It is a little bit more difficult but it works just fine


    where you want to add the text or links add this code to html page

    <script language="JavaScript" src="http://www.yourwebsite.com/file.js"></script>

    than create java file named file.js with following text in it

    document.write('the code or text you want to appear on each page');

    of course, file does not have to be named file.js. It can have any name you want it to have as long as it is reflected in the code you place on the html page.

    I hope this helps :)