[FX.php List] Encoding a link so that it'll process...

Bob Patin bob at patin.com
Thu Jul 14 17:14:54 MDT 2016


I'm generating a link on a PHP page, like this:

http://www.site.com/test.php?cc=two words

The client wants to be able to copy this link for use later, but when we do so, anytime "cc" is 2 or more words the query fails.

I tried encoding the spaces like this

two%20words

but it still didn't work.

Then I tried doing a str_replace to get something like this:

two|words

and then when the user gets to the page, taking the pipe and putting a space back in before the search. That failed too...

Any thoughts?


Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
FileMaker 9, 10, 11, 12 & 13 Certified Developer
http://www.longtermsolutions.com
-
iChat: bobpatin at me.com
Twitter: bobpatin
—
FileMaker Consulting 
FileMaker Hosting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting



More information about the FX.php_List mailing list