Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I fully refresh the page in CodeIgniter?

I am loading a form in an overlay. The overlay has a separate controller and action to the page that invokes the overlay.

On form submit, if successful, I simply want to reload the referring page that the overlay was loaded from. I can get the referring page to load, but it places the content inside the overlay.

header("Location: www.example.com", true, 302);

does not work.

Using the URL helper like this:

$url = $_SERVER['HTTP_REFERER'];
redirect($url);

Also does not work. Every time it loads in the overlay. I am sad because of it.

like image 415
Evernoob Avatar asked Dec 04 '22 14:12

Evernoob


1 Answers

You can use this code to refresh in codeigniter:

redirect($_SERVER['REQUEST_URI'], 'refresh'); 

it should work!

like image 58
Deepti Gehlot Avatar answered Dec 19 '22 19:12

Deepti Gehlot