$_GET Function

Discussion in 'PHP' started by chriswick, Mar 21, 2008.

  1. #1
    Hey guys,

    I want to post from vars from a URL but not sure how to pass them onto the page.

    Basicly I want to from another URL with the vars in my URL for example, www.example.com/?id=[GET VARS]
     
    chriswick, Mar 21, 2008 IP
  2. rmiller

    rmiller Peon

    Messages:
    56
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If I understand you correctly, then you're on the right track with using the $_GET function. It would look something like this, assuming your URL is www.example.com/?id=1

    <?
    $var = $_GET['id']; //var now equals '1'
    ?>
     
    rmiller, Mar 21, 2008 IP