Welcome Guest, Not a member yet? Register   Sign In
Login
#11

[eluser]Felipe Deitos[/eluser]
Hey CroNiX, can u answer me one more thing...

The login form is working and checking everything right...

What i wanna know: I got a menu in my header(view), when the visitor is not logged in he sees 3 itens, and when he is logged he sees 5 itens.

When the user log in, I set inside an array in the userdata:
Code:
'is_logged' => true

With that i can check if the usser "is_logged" or not...
I am doing like this in my header(view):
Code:
<?php if($this->session->userdata('is_logged')){ ?>
<p>Hidden Iten</p>
&lt;?php } ?&gt;

Is this the right way to do it, or there are best ways?






Messages In This Thread
Login - by El Forum - 07-11-2012, 09:58 AM
Login - by El Forum - 07-11-2012, 10:24 AM
Login - by El Forum - 07-11-2012, 11:16 AM
Login - by El Forum - 07-11-2012, 11:41 AM
Login - by El Forum - 07-11-2012, 11:55 AM
Login - by El Forum - 07-11-2012, 12:08 PM
Login - by El Forum - 07-11-2012, 12:25 PM
Login - by El Forum - 07-11-2012, 12:33 PM
Login - by El Forum - 07-11-2012, 12:39 PM
Login - by El Forum - 07-11-2012, 01:42 PM
Login - by El Forum - 07-11-2012, 01:46 PM
Login - by El Forum - 07-12-2012, 04:19 AM
Login - by El Forum - 07-12-2012, 10:52 AM
Login - by El Forum - 07-12-2012, 12:05 PM
Login - by El Forum - 07-12-2012, 12:12 PM
Login - by El Forum - 07-12-2012, 12:31 PM



Theme © iAndrew 2016 - Forum software by © MyBB