Welcome Guest, Not a member yet? Register   Sign In
if not logged in - return to index
#1

[eluser]miauksius[/eluser]
Hi,

I have a problem. I'm creating a guestbook, and I dont want that not logged in users could read the comments in it, so i tried this:
Code:
<?php

class Guestbook extends Controller {
    parent :: Controller ( );
    if ( $this -> session -> userdata ( 'logged_in' ) != TRUE )
    {
        redirect ( 'index.php/home' );
    }
}
?>

But it doesent work. It doesent redirect at all. Why? Could you give me some tips? Cause im gonna need this in other pages too.

Thank you for your help


Messages In This Thread
if not logged in - return to index - by El Forum - 07-28-2009, 10:14 AM
if not logged in - return to index - by El Forum - 07-28-2009, 10:57 AM
if not logged in - return to index - by El Forum - 07-28-2009, 12:13 PM
if not logged in - return to index - by El Forum - 07-28-2009, 12:17 PM
if not logged in - return to index - by El Forum - 07-28-2009, 12:28 PM
if not logged in - return to index - by El Forum - 07-28-2009, 01:52 PM
if not logged in - return to index - by El Forum - 07-28-2009, 02:07 PM
if not logged in - return to index - by El Forum - 07-28-2009, 02:36 PM
if not logged in - return to index - by El Forum - 07-28-2009, 02:37 PM
if not logged in - return to index - by El Forum - 07-28-2009, 05:39 PM
if not logged in - return to index - by El Forum - 07-28-2009, 05:42 PM



Theme © iAndrew 2016 - Forum software by © MyBB