CodeIgniter Forums
From form to URI - Printable Version

+- CodeIgniter Forums (
+-- Forum: Archived Discussions (
+--- Forum: Archived Development & Programming (
+--- Thread: From form to URI (/thread-20889.html)

From form to URI - El Forum - 07-24-2009

Hello, i have a form with input, i want to put the input value in the uri
e.g if user enters "12345" to input and submit the form, the URI becomes controller/method/12345

should i use HTTP header "Location" ?

From form to URI - El Forum - 07-24-2009

You can set the form to use method 'get' but that would result in controller/method/&input_name=12345 I guess.
Easiest way to do this is propably sending the form to controller/method, then check if the submitted ID is valid and then redirect to controller/method/ID using the CI redirect function.