Can't pass varables
Posted: Tue Jan 17, 2006 12:10 pm
I've been trying to integrate the PHPBB session with my own login for my site...so far so good, I've been able to keep the session alive throughout my site and the forum.
But in the process, I became unable to pass variables through my url. I have no idea of why...Because if I remove the PHPBB session addon I got, it all works fine.
I hope some of you can enlighten me a bit. Here are some of my code:
(Index.php)
(index2.php)
my header, menu, side and footer, are php scripts that fetches it's content from a sql DB, and they work fine.
My main.php is a switch function:
But the switch doesn't work, with the PHPBB addon apperantly...I'm blank, I've been at it for two days now, but I simply can't figure out why it doesn't work.
Hope some of you can!
Thanks in advance!
But in the process, I became unable to pass variables through my url. I have no idea of why...Because if I remove the PHPBB session addon I got, it all works fine.
I hope some of you can enlighten me a bit. Here are some of my code:
(Index.php)
Code: Select all
<?
session_start();
define('IN_PHPBB', true);
$phpbb_root_path = './forum/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
if( $userdata['session_logged_in'] )
{
include('index2.'.$phpEx);
} else {
include('index2.'.$phpEx);
}
?>Code: Select all
<?
if (!defined('IN_PHPBB')) {
die ("You can't access this file directly...");
}
define('MODULE_FILE', true);
require('int.config.php');
mysql_connect($server, $db_user, $db_pass);
mysql_select_db("$database");
include('temp/header.php');
include('temp/menu.php');
include('temp/side.php');
include('temp/main.php');
include('temp/footer.php');
?>My main.php is a switch function:
Code: Select all
<?
if (!defined('IN_PHPBB')) {
die ("You can't access this file directly...");
}
switch ($name) {
case "news":
include 'lib/news/news.php';
break;
...etc...
default:
include 'lib/news/news.php';
}
?>Hope some of you can!
Thanks in advance!