• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Simple search engine (POST or URI?)

#1
[eluser]mvdg27[/eluser]
Hi there,

On my website I'd like to implement a simple search engine. All very basic. Creating the controller to search the database and display the results, shouldn't be a problem.

I do however would like some input on how to pass the search query to my controller. As far as I can see I have two different options:

1) Use post data, which off course will be be available as de search query in my controller
2) Append the search query to my url, as such: "domains.com/search/my search query"

The first options probably is the easiest, the second one looks very interesting as the query is part of the URL, so it can be bookmarked, copy pasted etc.

The second option does cause some problems with disallowed charachters. Several characters (+ signs, accents, quotes, ampersands, commas etc.) are not allowed by default, but could very well be part of a user's search query ..

Does anyone have any advice on how to handle this?

Thanks! -Michiel


Messages In This Thread
Simple search engine (POST or URI?) - by El Forum - 08-29-2008, 04:16 PM
Simple search engine (POST or URI?) - by El Forum - 08-30-2008, 03:00 AM
Simple search engine (POST or URI?) - by El Forum - 08-30-2008, 07:05 AM
Simple search engine (POST or URI?) - by El Forum - 08-30-2008, 09:31 AM
Simple search engine (POST or URI?) - by El Forum - 08-30-2008, 11:29 AM
Simple search engine (POST or URI?) - by El Forum - 08-30-2008, 12:26 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.