Hi all,
I've posted this on the phpBB support board but go no response yet.
I've copied and pasted some code from the phpBB site which is designed to check users are logged into the boards. I'm eventually going to build a member's area into my site, using the board as the login, so I'll have to be able to check on every page in the member's section if the user is logged in or not.
I've made one tiny amendment to the check for authorization code, inserting echo('Logged in'); on one line, but have done nothing else.
But it doesn't work. I'm getting an unexpected T_STRING error on line 29, but I can't see the problem. Admittedly I'm completely new to all this PHP lark, so I'm hoping someone out there can see something I can't.
Can you let me know if you can see any problems in the code below?
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
define('IN_PHPBB', true);
$phpbb_root_path = './phpBB2/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
//
// Start session management
//
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
//
// End session management
//
?>
Welcome to random rant
<?
if( $userdata['session_logged_in'] )
{
echo('Logged in');
}
else_
{
echo('Please Login');
}
?>
</body>
</html>