CodeIgniter Forums
return to the current 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: return to the current URL (/showthread.php?tid=37568)



return to the current URL - El Forum - 01-13-2011

[eluser]simonij[/eluser]
Hello i want to redirect to the current URL then a user login how can i do that?

i have try

$currentURL = current_url();

redirect($currentURL);

but it dont work


hope some one can help me out Smile

best regards Simon


return to the current URL - El Forum - 01-13-2011

[eluser]stuffradio[/eluser]
try
Code:
redirect(current_url());



return to the current URL - El Forum - 01-13-2011

[eluser]Cristian Gilè[/eluser]
Code:
redirect(uri_string(),'refresh');
EDIT: to use redirect(), remember to load the URL helper.


Cristian Gilè


return to the current URL - El Forum - 01-13-2011

[eluser]Phil Sturgeon[/eluser]
Quote:but it dont work

What happened?


return to the current URL - El Forum - 01-14-2011

[eluser]simonij[/eluser]
it dont work :/


return to the current URL - El Forum - 01-14-2011

[eluser]Phil Sturgeon[/eluser]
[quote author="simonij" date="1295028401"]it dont work :/[/quote]

"It doesn't work" does not help us at all, therefore we cannot help you.

How to Report Bugs Effectively