I have written a search engine for a web site I am working on. I wanted to set up the results to span multiple pages when necessary, so i created links similar to google (http://www.google.com) with a prev, 1,2,3,4 etc, and next to display when applicable.
When only one word is typed into the search box and the query is sent, everything works fine including my links (which by the way use $PHP_SELF as the main target).
When I set them up without using urlencode(), only the first word of the string is passed to all subsequent pages, but the query still works fine (ie, all results are returned as expected).
However, when i use urlencode to replace the spaces and special characters with %x, the LINKS are created with the proper code (internet+design). When I use the link, the next page uses urldecode() to remove the special characters, which returns the string "internet design". However, when this is run through the query, ZERO results are displayed.
I did an md5() on the strings, both on the first time through and the second, and they line up...so i assume the strings are exactly the same after the encode() and decode(). Any ideas? I am totally stumped.
Thank you.