Jump to content

bubblesnout

New Members
  • Posts

    1
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

bubblesnout's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Firstly, Hi everybody here! I hope to hang around here, because I'm starting to develop in PHP more and more these days. Anyway, here's my query. I'm using values from a database to construct a url with a querystring, being used as a link on a page. Because this value may contain things such as an ampersand (&), I figured I would be right in using urlencode(), or even better, rawurlencode(). Here's an example of the outputted HTML: <a href="?page=music&group=band&value=Conor%20Oberst%20%26%20The%20Mystic%20Valley%20Band">Conor Oberst & The Mystic Valley Band</a> It looks as though the 'value' has been encoded perfectly, with the ampersand being replaced with %26. However my problem is this. Even with this encoded url, PHP is splitting the string into the $_GET array at the %26. From that url, here's an output of print_r Array ( => music [group] => band [value] => Conor Oberst [The_Mystic_Valley_Band] => ) As far as I've read, this is NOT how php is supposed to handle it. Although it is doing this both on my local WAMP installation, and also on my Unix server running apache. Any thoughts?
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.