situation desired
1. users go to a page outside forum directory
2. if they are logged into the forum when they visit the page, it displays
3. if they are not logged in, they are redirected to a login page
code I am trying to use that doesn't work ;
PHP Code:
<?php define('IN_PHPBB', true); $phpbb_root_path = './sdb/'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include($phpbb_root_path . 'common.' . $phpEx); // Start session management $user->session_begin(); $auth->acl($user->data); $user->setup();
if($user->data['is_registered']) { Print "Hello, World... content of page will go here. !";
} else { { header( 'http://www.gt-6.com/sdb/viewtopic.php?f=4&t=22744&p=143475#p143475' ) ; } } ?>
any ideas why it isn't working?
or how I can do this?
Last edited by dimensio; 11-07-2010 at 12:59 AM..
|