Welcome Guest, Not a member yet? Register   Sign In
Auth system problem...
#1

[eluser]XssLab[/eluser]
Hello boys,

I have a problem with my simple login file...
It is a logical problem.

this code:

Code:
$session = $this->session->set_userdata('username');
                $this->load->view('my', $session);

setting up a 'session' username data and load my.php file in /views directory.

But, in this solution, the url don't change (example login/go, and I wanna... /my/start).

If I use redirect function
Code:
redirect()

the session value can't be passed....

Thanks for reply Wink
#2

[eluser]Flemming[/eluser]
in your controller
Code:
$this->session->set_userdata('username','My Name');
redirect('/my/start/');
in your view
Code:
<p>user id: &lt;?=$this->session->userdata('username')?&gt;</p>

hope that helps! Smile




Theme © iAndrew 2016 - Forum software by © MyBB