SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Evangelist perpetual_dream's Avatar
    Join Date
    Nov 2005
    Location
    Jerusalem
    Posts
    542
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP_SELF doesn't pass the parameter

    Hello,

    I have a log in "box" in all the pages of my website for the non-logged in users to log in through. I have a myrefer parameter which gets the name of the page which referred the user and redirects the user to it after login. $myrefer is set in my header file.

    Code PHP:
     $myrefer=base64_encode(basename($_SERVER['PHP_SELF'])); 
    //I decode it in the login page and redirect
    // the user after login

    The major problem is: PHP_SELF doesn't get the passed paramters ..... say the current page is : companies.php?id=45&classified_id=99 ... PHP_SELF returns companies.php without any parameters....
    How can I know the full URL of the currrent page?

    Thanks
    Tanzeelnet - Best arabic downloadsite
    Linux Hosting |Free Downloads |

  2. #2
    SitePoint Wizard
    Join Date
    Mar 2002
    Location
    Bristol, UK
    Posts
    2,240
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Try $_SERVER['REQUEST_URI']


Tags for this Thread

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
  •