[eluser]Lokut Da[/eluser]
Hi! How have u been?
I have this controller:
test.php
Code:
$this->load->view('plantilla/head.tpl.php', $head);
$this->load->view('plantilla/left.tpl.php', $menu);
$this->load->view('logueo/index_logueo.php');
Well, I need to validate a session. If a determinate session exists, I must show or not a page.
This validation is for some pages no all (restricted pages). I want to have this validation in other file, but i don't know how must to do that on CI.
The idea is:
valida_sesion.php
Code:
if ( !$this->session->userdata('any') ) {
//if session "any" no exists, go to index page
redirect('index');
}
Then, can use that validation on controllers.
How must to do the validation for the pages i need?
I hope u can help me
mirk:
Thanks!
PDT: Excuse my english!