nschessnerd 0 Posting Whiz in Training

Hey, I want to integrate a phpbb login with my site so i added the following code:

<?php
define('IN_PHPBB', true);
$phpbb_root_path = "../forum/";
$phpEx = substr(strrchr(__FILE__, '.'), 1);
include($phpbb_root_path . 'common.' . $phpEx);
include($phpbb_root_path . 'includes/functions_display.' . $phpEx);
include($phpbb_root_path . 'includes/bbcode.' . $phpEx);

// Start session management
$user->session_begin();
$auth->acl($user->data);

?>

and later on...

// Grab user preferences
$user->setup();
if ($user->data['user_id'] != ANONYMOUS)
{
// do some stuff
}else
{
echo('<form action="http://fastclan.org/forum/ucp.php?mode=login" method="post" enctype="multipart/form-data">
<input type="text" name="username"><br />
<input type="password" name="password"><br />
<input type="hidden" name="redirect" value="http://fastclan.org/new">
<input type="submit" value="login" name="login">
</form>');
}

So i login, it goes to the forum then redirects back to this page and asks for a login again....

does anyone know why?
could it be a cookie issue?
i set domain to fastclan.org and path to /forum/
(on another possibly related issue) but it doesnt remember me when i close the window...

also if i have the forum open and refresh the above script it logs me out of the forum...


i am well versed in php...

any ideas?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.