Jump to content

Archived

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

Mateobus

Passing strings in the URL

Recommended Posts

Suppose that you were passing dynamic company names via the $_GET array.  Is there a function you can apply to the string to avoid potential errors because of the & sign in a string, for example:

site.com?company=Dell
and
site.com?company=Fujitsu

would be fine, but

site.com?company=AT&T wouldn't work.

Share this post


Link to post
Share on other sites
[url=http://php.net/urlencode]urlencode[/url]().

Share this post


Link to post
Share on other sites

×

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.