CodeIgniter Forums
When i click Undo Button in Browser the go back to login form w/o checking the session. - 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: When i click Undo Button in Browser the go back to login form w/o checking the session. (/showthread.php?tid=58953)



When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]frans.delacruz@yahoo.com[/eluser]
Hi Guys
I'm newbie in CodeIgniter..I have a problem about the Undo Button in Browser will go back to login form ..I already logged in..How to checking my session if i click Undo Button thxx


When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]noideawhattotypehere[/eluser]
Code:
if ($this->session->userdata('loggedin')
{
redirect('anywhereyou/want');
}

PS: This will work only if you set a flag in session 'loggedin' after successful login attempt


When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]frans.delacruz@yahoo.com[/eluser]
quote author="noideawhattotypehere" date="1375950474"]
Code:
if ($this->session->userdata('loggedin')
{
redirect('anywhereyou/want');
}

PS: This will work only if you set a flag in session 'loggedin' after successful login attempt[/quote]
I have that i need is how to refresh my controller when i click Undo Button in the Browser


When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]noideawhattotypehere[/eluser]
Disable page caching


When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]frans.delacruz@yahoo.com[/eluser]
[quote author="noideawhattotypehere" date="1375950954"]Disable page caching[/quote]


Code in CodeIgniter?..can you post an example


When i click Undo Button in Browser the go back to login form w/o checking the session. - El Forum - 08-08-2013

[eluser]noideawhattotypehere[/eluser]
http://www.robertmullaney.com/2011/08/13/disable-browser-cache-easily-with-codeigniter/