1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

PHP ?id= multiple code error

Discussion in 'PHP' started by gulliccj, Jul 10, 2008.

  1. gulliccj

    gulliccj New Member

    Joined:
    Jun 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    hey! i am currently trying to use the php code for multiple pages in one file via the ?id= code. i am using the php file redir.php. here is the code:

    <?php
    $id = $_GET['id'];
    if($id == ''){
    regular page //code or include goes here
    }
    elseif($id == 1){
    id 1 //code or include goes here
    }
    //repeat for all styles/pages.
    ?>


    and i cannot get it to work. it redirects you, but the page is blank. can you tell me what is wrong? thanks!
     
  2. gulliccj

    gulliccj New Member

    Joined:
    Jun 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    to try it, go to
    HTML:
    <a href="http://nebraskageek.com/php">nebraskageek.com/php</a>
     
  3. gulliccj

    gulliccj New Member

    Joined:
    Jun 7, 2008
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    0
    THAT was wierd: nebraskageek.com/php
    thats the url to try it
     

Share This Page