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 5 of 5
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    199
    Thanks
    30
    Thanked 0 Times in 0 Posts

    How to GET # symbol in URL?

    I'm trying to get a variable from a URL, for example index.php?user=abc#123, but when I try to GET or REQUEST the variable $user from the URL, it just shows up as "abc". Is there anyway to get the entire string?

  • #2
    New to the CF scene
    Join Date
    Oct 2012
    Posts
    8
    Thanks
    1
    Thanked 0 Times in 0 Posts
    The longshot would be to replace the # with something unique that will actually pass, then reverse it on the other side.

    swap # for LOL and send it through as index.php?user=abcLOL123

    then replace LOL with #

    as, I said, longshot.

  • #3
    Regular Coder
    Join Date
    Jan 2006
    Posts
    199
    Thanks
    30
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by outspoken View Post
    The longshot would be to replace the # with something unique that will actually pass, then reverse it on the other side.

    swap # for LOL and send it through as index.php?user=abcLOL123

    then replace LOL with #

    as, I said, longshot.
    Ok, lol, I had though of something like that using a string replace, was hoping there was an easier solutions though

  • #4
    Senior Coder
    Join Date
    Sep 2010
    Posts
    2,451
    Thanks
    17
    Thanked 275 Times in 275 Posts
    Yes, it will ignore the # as that is used to pass information to the
    HTML of the page.

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    Quote Originally Posted by Remix919 View Post
    Ok, lol, I had though of something like that using a string replace, was hoping there was an easier solutions though

    not easier as such but the `normal` way around this is to urlencode()/urldecode() or base64_encode()/base64_decode() the variable
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

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