CodeIgniter Forums
set_value() with redirect() help for URL - 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: set_value() with redirect() help for URL (/showthread.php?tid=47461)



set_value() with redirect() help for URL - El Forum - 12-09-2011

[eluser]veledrom[/eluser]
Hi,

This is my URL http://localhost/myserver/index.php/myform/one to the page where user fills the form and submit it to this function public function process_one() in same class myform. The functions uses form_validation rules.

Question: If the validation fails then the URL appears as http://localhost/myserver/index.php/myform/process_one but I want it to appear as http://localhost/myserver/index.php/myform/one instead, also without loosing benefits of set_value() function in form.

If I use $this->one() then I can retrieve values with set_value() but the URL appears as http://localhost/myserver/index.php/myform/process_one. If I use redirect('one') then the case above turns the other around.

Thanks