• home
  • forum
  • my
  • kt
  • download
  • Do a Navigation System that Uses ?id=1

    Author: 2008-08-16 09:22:30 From:

    Here is the code for it

    CODE
    <?PHP
    /*include("includes/".$id .".php");*/
    if(!isset($_GET['id'])){
        $page = "home";
        }
        
    else {
        $id = $_GET['id'];
        }
      
    if(file_exists("includes/".$id .".php")){
        include("includes/".$id .".php");
        }
    else {

    /* Put your own error message or some other content.  
        Even a redirect to the main page would work           */                                            

    }
    ?>


    All that you need is to put this in one of your pages and make sure the page has a .php extension.
    Then, make a folder name includes and within place the files, also with .php extentions, that you want
    to serve up through this way.

    discuss this topic to forum

    relation tutorial

    No relevant information

    Category

      Ad Management (4)
      Calendars (3)
      Chat Systems (7)
      Content Management (6)
      Cookies and Sessions (8)
      Counters (8)
      Database Related (8)
      Date and Time (9)
      Development (6)
      Discussion Boards (7)
      E Commerce (6)
      Email Systems (9)
      Error Handling (5)
      File Manipulation (10)
      Flash and PHP (4)
      Form Processing (7)
      Guestbooks (8)
      Image Manipulation (3)
      Installing PHP (5)
      Introduction to PHP (9)
      Link Indexing (6)
      Mailing List Management (8)
      Miscellaneous (10)
      Networking (6)
      News Publishing (6)
      OOP (8)
      PEAR (6)
      PHP vs Other Languages (2)
      Polls and Voting (5)
      Postcards (0)
      Randomizing (8)
      Redirection (8)
      Searching (6)
      Security (6)
      Site Navigation (10)
      User Authentication (14)
      WAP and WML (7)
      Web Fetching (8)
      Web Traffic Analysis (15)
      XML and PHP (16)

    New

    Hot