Welcome Guest, Not a member yet? Register   Sign In
clean url on search submit button
#1

[eluser]Arun Joshi[/eluser]
Hi All,

I have a search box in a form, I want to create a url like
Code:
mysite.com/search/srchtext/abc
or
Code:
mysite.com/search/abc
. Here abc is the text to find. My form method is get and button type is submit. Now when I click my submit button, the url is ?srchtext=abc&btnsrch;= .

-Arun
#2

[eluser]jrtashjian[/eluser]
I believe this is controlled by the browser, not CodeIgniter. I'd say switch the method from "get" to "post" and handle the submission using $this->input->post('srchtext'); etc.

Is there a specific reason you are needing to use the get method?




Theme © iAndrew 2016 - Forum software by © MyBB