Web Analytics Made Easy -
StatCounter displaying corresponding pages - CodingForum

Announcement

Collapse
No announcement yet.

displaying corresponding pages

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • displaying corresponding pages

    Hai

    I am facing a problem.I have a PHP page and I am calling menu , header and body into that.

    in the body section I want the following links and when we click on that we can get the corresponding page.

    the body section will look something like this

    world | windows | linux | DOS|

    when i click on the world i should get the corresponding information below it and when i click on linux i shuld get the corresponding info.

    any kind of suggestion will be really helpful.

    Thanks

    urs
    sai

  • #2
    Why haven't you posted this in the php section?

    Anyway a basic way is...

    PHP Code:
    <?php
    $page 
    $_GET['page'];
    switch(
    $page){
        case 
    'world':
            include(
    "world.php");
            break;
        case 
    'windows':
            include(
    "windows.php");
            break;
        
    etc etc

        
    default:
            include(
    "notfound.php");
    }
    ?>
    Put that where you want the info/page to show. Of course there's other ways to do it, but as you haven't said how you plan to add the info, this is the best I could come up with.

    The url you'd use in that example would be

    http://yourdomain.com/page.php?page=windows
    Last edited by Nightfire; Feb 26, 2004, 09:15 PM.

    Comment

    Working...
    X