CodeIgniter Forums
how to change url after submit form? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23)
+--- Thread: how to change url after submit form? (/showthread.php?tid=40503)



how to change url after submit form? - El Forum - 04-10-2011

[eluser]liren[/eluser]
Hello friends:

I have a submit form in a page,when user submit form data,the url change to http://localhost/usermanage/usersubmit
Now,I want to change the url to http://localhost/usermange/otherURL(for example:http://localhost/home/index). how to do it? How to change the controller code to do this?Thanks!


how to change url after submit form? - El Forum - 04-10-2011

[eluser]WanWizard[/eluser]
If you want to post the form to another URL, change the action in the form. If you want to go to that other URL after processing the form, use redirect().