Redirect guest

Hi. I'm gonna create a new index page where everyone is logged, is redirected to the main index (Dolphin index), and the guest stay there until they do the login.

require_once( 'dolphin/inc/header.inc.php' );

check_logged();

if(!isLogged())

{

header("location: dolphin/index.php");

}

else{

print "Hi guest";

}

But everytime i go to this page, i'm redirected to dolphin/index.php, even if I'm not logged. What's wrong? Thanks.

Quote · 25 Aug 2011

this should be like this

 

 

require_once( 'dolphin/inc/header.inc.php' );

check_logged();

if(isLogged())

{

header("location: dolphin/index.php");

}

else{

print "Hi guest";

}

 

cuz the ! means not so your saying if he is not logged in then redirect him

good luck ..

nazzal

if i did help you .. it wont hurt to go to my profile and add a recommendation for me ;)
Quote · 26 Aug 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.