Jump to content

converting the "&" symbol into special characters in URL


svgmx5

Recommended Posts

So i'm having some sort of an issue.

 

what i'm trying to do is to get the name from an URL using GET that includes the "&" symbol.

 

I have a link and that link looks like this: name_of_company_&_member. What im trying to do is to get that whole line using Get and echoing on a page.

 

The problem is that the line cuts off after "company_" because it reads the & symbol as something different.

 

Does anyone know how i can be able to retrieve the whole line including everything after the & symbol? i tried using the special character "%26" but i still get the same result.

You just have to urlencode() the value before you stick it into the url.  If your still having problems after that, you'll have to post code so we can see where you've made the mistake.

 

 

well he said he tried a urlencoded & and it didn't work.  I suspect he's decoding it before parsing it.

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.