Help Needed on PHP

Discussion in 'PHP' started by mvd7793, Nov 12, 2006.

  1. #1
    I would like to have a page called something like site.php or site.html. Then, after that, I want to be able to do something like ?id=345 (www.mydomain.com/site.php?id=345) and go to a different page that ?id=235. (www.mydomain.com/site.php?id=235) How would I go about doing that? Can you possibly also give me a link to a tutorial telling me how to do that?
     
    mvd7793, Nov 12, 2006 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
  3. Fl1p

    Fl1p Active Member

    Messages:
    511
    Likes Received:
    15
    Best Answers:
    0
    Trophy Points:
    58
    #3
    Fl1p, Nov 12, 2006 IP
  4. samzach

    samzach Peon

    Messages:
    484
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #4
    your question isn't very clear... you want to open a page based on the id?
    site.php?id=235 will open a page and site.php?id=236 would open another?
     
    samzach, Nov 12, 2006 IP
  5. daboss

    daboss Guest

    Messages:
    2,249
    Likes Received:
    151
    Best Answers:
    0
    Trophy Points:
    0
    #5
    i think you got it wrong... typically, getting to http://www.mydomain.com/site.php?id=235 would mean that the target page is site.php itself and you are passing a $_GET variable to site.php.

    if you indeed mean, going to another page indicated by id=235, then site.php is merely a forwarder. if this is the case, in site.php, do the following:
    1. read the final target url from a database using the id=235 as a key
    2. use the header command to re-direct to the new page

    good luck!
     
    daboss, Nov 13, 2006 IP