Welcome Guest, Not a member yet? Register   Sign In
How display checked filter variable value in url
#2

Simply use $this->input->get('color') in your controller to fetch the variable that was passed in the query string.
You don't need to change the setting of $config['enable_query_strings'). If you would set to true, CI will no longer accept url's with segments, but it wants the controller and method as query string variables too. E.g.:
PHP Code:
http://somepage.nl/?c=products&m=index&color=red 

With $config['enable_query_strings') set to false, your url will do just fine.
Remember to process the get variables in the index method of the controller, because CI expects a controller and a method in the url. If you omit the method, CI points to the index method in the given controller.
Reply


Messages In This Thread
RE: How display checked filter variable value in url - by Wouter60 - 11-25-2019, 12:59 PM



Theme © iAndrew 2016 - Forum software by © MyBB