1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

$_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