CodeIgniter Forums
Intermediary confirmation page - 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: Intermediary confirmation page (/showthread.php?tid=11036)



Intermediary confirmation page - El Forum - 08-22-2008

[eluser]neen[/eluser]
I want to create a page after a user has logged in saying "You have been logged in, you will be forwarded in 5 seconds"

Is there any function built in to CI to facilitate a timed redirect (as opposed to an instant one using redirect())?


Intermediary confirmation page - El Forum - 08-23-2008

[eluser]Randy Casburn[/eluser]
Nope. Have to build your own.

Use:

Code:
header("Refresh: content:5;url=THEURL");

Randy


Intermediary confirmation page - El Forum - 08-23-2008

[eluser]neen[/eluser]
Not a big deal really...
Thanks


Intermediary confirmation page - El Forum - 08-23-2008

[eluser]Randy Casburn[/eluser]
For the record, you can send redirect a second argument "refresh". But the refresh timeout is 0, so doesn't really meet your needs.

$this->url->redirect('THEURL','refresh');

is the same as

header("Refresh: content:0;url=THEURL");

Randy


Intermediary confirmation page - El Forum - 08-23-2008

[eluser]neen[/eluser]
Yeah, I need a timed redirect here to let the user know they have been logged in/out...