[eluser]Unknown[/eluser]
Hi everyone!
I'm so sorry but I don't found anywhere what I'm looking for to solve my problem (..and sorry for my English.. I'm italian )
...that's my problem:
in the constructor of the controller I load a model that I use in the head of the index function:
Code:
function index() {
if ( $this->login_model->_is_logged() ) {
//show logged in page
}
else {
//show login form
}
}
and it works perfectly... if I don't reload the page shown
The "_is_logged()" function checks session and cookies, but these contain a encrypted part of the data passed via form.
When I refresh the "logged in" page, without resending data, it goes back, obviously, at the login form, because it reloads the model again and the saved datas are lost.
How can I know if a model is already loaded or not?
Thanks guys
edit: oh.. I've seen this is not the correct section for my question
..excuse me..