SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Mar 2004
    Posts
    1,647
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    $_SERVER variable question

    hi...
    i wonder if there is a way to get the location like with $_SERVER["PHP_SELF"]
    but include variables after "?"...
    example ..index.php?bla=1&blabla=2
    any suggestion appreciated..
    thanx in advance..

  2. #2
    SitePoint Zealot _theworks's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    165
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    if you want to *get* the variables in the url like http://mysite.com?id=1234
    just use the super global array ; $_GET['id];

  3. #3
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,806
    Mentioned
    158 Post(s)
    Tagged
    3 Thread(s)
    Use $_SERVER['QUERY_STRING'] to get the variables and append it to $_SERVER['PHP_SELF'].

    www.php.net/globals



    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •