[eluser]Dennis_gull[/eluser]
Hello everyone,
I'm new to codeigniter and this community so first of all I would like to thank you guys for this excellent MVC framework
Now when I have played around with it for a couple of days I have a few questions I would like to ask:
1) URI - I understand that the URI uses
<optional folder>/class/function/variables so lets say I create a controller named search and I want the user to be able to type
example.com/search/<search variable> to get a search result, meaning the index page (function) is the search result page, but CI expect the second parameter to be the function and therefore I have to write
example.com/search/index/<search variable>, is it somehow possible to skip the index in the url to get a more clean url?
2) GET forms - This question is related to the first one, lets say I create a search form with a GET method, when i submit this form I get in return a normal query string like this
example.com/search?id=<my_search> instead of
example.com/search/<my_search>. Is there some option to enable seo URIs on GET forms?
3) sessions - I feel a little "unused" to the CI sessions, I understand that the session is stored in the cookies but shouldn't the session end once the user close the browser? For now the session is kept even if you close the browser.
4) I would like to automatically run some lines of code before I initiate any script in an controller, is this possible without changing any of the "core" files?
I will probably have more questions later but I think this will do for now.
Thanks in advance!