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.

URL variables do not come across

Discussion in 'PHP' started by ojav, Apr 15, 2008.

  1. #1
    I just installed PHP 5.0.18 on a SuSE Linux server. Everything else seems to work allright, but the variables which are sent with URL are ignored.

    On a page with URL
    mypage.php?variable=3


    This code should print ´3´ , but it does not.
    echo "$variable";


    Did I overlook something when I installed PHP?
     
    ojav, Apr 15, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    Hello,

    It should be:
    
    echo $_GET['variable'];
    
    PHP:
    $variable will only be set if you set register_globals in PHP.ini to on.

    Jay
     
    jayshah, Apr 15, 2008 IP