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 2 of 2

Thread: Cookie Strip

  1. #1
    Regular Coder
    Join Date
    Mar 2007
    Location
    UK
    Posts
    151
    Thanks
    9
    Thanked 2 Times in 2 Posts

    Cookie Strip

    Hey, I'm trying to make a cookie with the previous URL in which it sets from PHP_SELF, so far I have got it to work but I want to strip some information out of the cookie. At the moment the cookie says:
    Code:
    hanwell/index.php
    I want to strip out hanwell and the forward slash, I cant figure out how to do it. Help?

    Thanks for any help

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try
    PHP Code:
    basename(htmlentities($_SERVER['PHP_SELF'])); 
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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