Welcome Guest, Not a member yet? Register   Sign In
site search and codeigniter urls
#1

[eluser]neomech[/eluser]
I'm about to implement a search feature on my CI-built website, and so far I've been able to avoid using querystrings and have stuck with uri segments (which I like).

However, for this search functionality I want two things:

1. Works if Javascript is disabled;
2. Results have a URL that can be bookmarked.

I don't really know how to stick with uri segments to accomplish this. It seems to me that the only way to get the data from the searchbox (the text entry field) into the url when the user clicks on the "search" button (the form submit button), is to either use GET or use javascript with an onSubmit function.

Am I correct, or am I missing something?
#2

[eluser]umefarooq[/eluser]
hi use search box for searching records and to make you uri save just read the following post
http://ellislab.com/forums/viewthread/107741/
#3

[eluser]neomech[/eluser]
Hi. Thanks for the reply.

I figured it out by just having the first controller take the post variables and redirecting them into another controller as nicely formatted segments. Works great. I'm guessing that's how it's supposed to be done, but someone let me know if that's silly.

I didn't have any problems with rawurlencode, beyond needing to allow some additional characters in my config file.




Theme © iAndrew 2016 - Forum software by © MyBB