CodeIgniter Forums
From form to URI - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: From form to URI (/thread-20889.html)



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

[eluser]Unknown[/eluser]
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

[eluser]davidbehler[/eluser]
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.