Hello all,
I am very tired and rather disappointed that no one has been able to help me with my problem, and believe me... I have been everywhere (tons of sites, IRC chats, e-mailing people and more)... so I will try and do my best to explain my problem. Basically, what I want to do is run my site so that you can login from outside of my forum... but the most important part is that I want the person's username to show up on a .php file OUTSIDE of my forums.. such as "Welcome <username>!" or "You are not logged in!" if they aren't logged in. I am running phpBB and have not had any success yet, even after talking to peeps on the phpbb.com forums... Although they give a basic tutorial on how to integrate, the code I have been using never says that I am logged in and even displays "You are not logged in!" when I am. I have changed the code several times and I really need help, due to the fact that I have only been doing php for about a week :bemused: . Here is a basic idea of the code I am using:
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './forums/';
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
//
?>
<html>
<head>
<title>Untitled Document</title>
</head>
<body>
<?php
if( $userdata['session_logged_in'] )
{
echo "It is working! HOORAY!";
}
else
{
echo "You are not logged in!";
}
?>
</body>
</html>