Cody Pendant has asked for the wisdom of the Perl Monks concerning the following question:
I have search engine I've written.
I have a "10 results per page" format.
When the user searches for "what's up doc?" and gets more than ten results, I want them to be able to go to the next page (results 11 to 20) and also to populate the search field on that page with their query. So I need the string to be encoded.
What's the correct module and command to use to transform "what's up doc?" with its spaces and punctuation, into something that's legal for a query string, that is, not:
TIA,myscript.cgi?query=what's up doc?&page=2
Every bit of code is either naturally related to the problem at hand, or else it's an accidental side effect of the fact that you happened to solve the problem using a digital computer.
M-J D
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: URL/URI encoding strings to go into query strings
by dakkar (Hermit) on Feb 09, 2003 at 13:10 UTC | |
|
Re: URL/URI encoding strings to go into query strings
by steves (Curate) on Feb 09, 2003 at 06:11 UTC | |
by Coruscate (Sexton) on Feb 09, 2003 at 09:53 UTC | |
|
Re: URL/URI encoding strings to go into query strings
by Jenda (Abbot) on Feb 09, 2003 at 21:27 UTC | |
|
Re: URL/URI encoding strings to go into query strings
by Cody Pendant (Prior) on Feb 09, 2003 at 20:36 UTC | |
|
Re: URL/URI encoding strings to go into query strings
by tomhukins (Curate) on Feb 10, 2003 at 13:09 UTC |