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
  1. #1
    New Coder
    Join Date
    May 2009
    Location
    Bangalore
    Posts
    75
    Thanks
    5
    Thanked 0 Times in 0 Posts

    Question Problem with # and & symbol.

    Hi all,

    I am facing problem in getting values of parameters which contain # and & symbol.I am sending few parameters to some other page but when I am trying to print that value in PHP page then the value after these symbols becomes NULL automatically.Can any one tell how to fix this problem.

  • #2
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,979
    Thanks
    4
    Thanked 2,659 Times in 2,628 Posts
    You mean like a string over _GET for example? You'll need to encode special characters on it with urlencode() before sending it.
    eg:
    PHP Code:
    $string '#1&';
    print 
    '<a href="mypage.com?string=' urlencode($string) . '">Link</a>'
    PHP Code:
    header('HTTP/1.1 420 Enhance Your Calm'); 


  •  

    Posting Permissions

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