Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New Coder
    Join Date
    May 2006
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP_SELF and _GET variables

    Hello all,

    I am using the $_SERVER[PHP_SELF] variable in order to make my own statistics program with an MySQL database. The problem is that for some reason, PHP_SELF does not include _GET variables that are appended to the path name. Is there another method I should be using?

    Thank you so much...

  • #2
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    Try this:

    PHP Code:
    print $_SERVER['PHP_SELF'].$_SERVER['REQUEST_URI']; 
    HTH,
    Dan
    Last edited by whizard; 12-22-2006 at 05:23 AM.
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION

  • #3
    New Coder
    Join Date
    May 2006
    Posts
    47
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Dan,

    Thanks, that worked perfectly. Very much appreciated!

  • #4
    Senior Coder whizard's Avatar
    Join Date
    Jan 2005
    Location
    Philadelphia, PA, USA
    Posts
    1,662
    Thanks
    14
    Thanked 76 Times in 76 Posts
    No problem, glad you got it worked out



    Dan
    PHP Tip: If you want to use short tags (<? or <?=$var) then make sure short_open_tag is set to "1". It really helps.

    Don't forget to save everyone time and mark your thread as Resolved :)

    "Also note that it is your responsibility to die() if necessary."

    DON'T USE THE MYSQL_ EXTENSION


  •  

    Posting Permissions

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