CodeIgniter urls |
[eluser]georgerobbo[/eluser]
Hello, I would just like some clarification on the CodeIgniter url module. If I developed a simple search form in standard php using the GET method, I would get a standard query string such as Quote:http://localhost/index.php?id=2. If I did the same in CodeIgniter, would it automatically rewrite the url to something like Quote:http://localhost/index.php/welcome/search/2.
[eluser]ggoforth[/eluser]
To answer the second part of your question, no codeigniter will not automatically rewrite your URLS. If you submit a form using GET you are going to get your first URL (?id=2). You need to craft your URLS properly, using POST for form submits, etc... That said, as cahva pointed out, using your second URL codeigniter would properly route you to the Welcome controller and the Search method passing it a variable that in your case, equals 2. |
Welcome Guest, Not a member yet? Register Sign In |