How to change/edit 1 page menu and all pages are changes?

Discussion in 'PHP' started by ItoNakamura, Aug 29, 2006.

  1. #1
    Hi..all

    I have no knowdlege in php; as i develope my website further, sometimes i need to add/edit the menu on the main index page; and subsequently i also need to change also other pages as well. If i do it on html; its going to be very tedious. How do i do it automatically if by php? i juz need to change/edit 1 page meu and all pages are changes? any php expert pls help.. deeply appreciate & thanks...:)
     
    ItoNakamura, Aug 29, 2006 IP
  2. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Save your menu as menu.php and add the following to each page:
    <?php
    include('menu.php');
    ?>
    Code (markup):
     
    mad4, Aug 29, 2006 IP
  3. fscripting

    fscripting Banned

    Messages:
    288
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #3
    include it with php or use iframes
     
    fscripting, Aug 29, 2006 IP
  4. ItoNakamura

    ItoNakamura Peon

    Messages:
    15
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi..fscripting

    whats is iframe? I dun have knowledge in php... hope u can explain a bit ... thanks in advance...:)
     
    ItoNakamura, Aug 29, 2006 IP
  5. mad4

    mad4 Peon

    Messages:
    6,986
    Likes Received:
    493
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Never use an iframe for your site, its suicide!!!!!!!!
     
    mad4, Aug 29, 2006 IP
  6. sebastya

    sebastya Well-Known Member

    Messages:
    2,449
    Likes Received:
    46
    Best Answers:
    0
    Trophy Points:
    138
    #6
    haha true..use php or SSi
     
    sebastya, Aug 29, 2006 IP
  7. johniman7

    johniman7 Peon

    Messages:
    245
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you can use php use the code the first guy gave you. Make it menu.txt and then just paste the html code of your menu into a file called menu.txt . That is what I do anyhow. Goodluck.
     
    johniman7, Aug 29, 2006 IP
  8. fscripting

    fscripting Banned

    Messages:
    288
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #8
    ya use php

    iframe is html

    <iframe src ="/test.txt" width="100%"> </iframe>
    Code (markup):
     
    fscripting, Aug 29, 2006 IP