Very basic php question

Discussion in 'PHP' started by baris22, Nov 7, 2007.

  1. #1
    Hello all,

    I need to do this.

    If page is index.php i want to include a.php
    if the page is contact.php i want to include b.php

    how can i do this?

    I am only using 1 page code

    Thank you all
     
    baris22, Nov 7, 2007 IP
  2. ForumJoiner

    ForumJoiner Active Member

    Messages:
    762
    Likes Received:
    32
    Best Answers:
    0
    Trophy Points:
    83
    #2
    The basic steps are:
    - read the name of the current page (run a phpinfo() to see what variable to use for it)
    - compare the name of the current page with index.php and with contact.php

    If you would like more details, please reply.
     
    ForumJoiner, Dec 11, 2007 IP