PDA

View Full Version : Session problem on nonvb


Matrixgl
01-26-2004, 01:29 PM
I am trying to intigrate vB 2.3.3 with a cms that I am writing. Now, I have a header.php, that is contains the javascripts, basically like vB headerinclude that gets included in every page.

In that page, I have this piece of code:

require_once('/path/forums/global.php');
if (!$bbuserinfo['userid']) {
echo " Login form here ";

}

and underneath that, I have the necessary codes to connect to my cms database.

$link = mysql_connect("localhost", "xxxxx", "xxxxx");
mysql_select_db("gamerzli_cmsdb", $link);

Now, when I browse my cms, I get an error, saying sessions cant be updated in the table (gamerzli_cmsdb.sessions). Its trying to find the sessions table in the wrong database.

Now, if I put the login check part AFTER my cms database connect code, sessions now work, but the cms database gets disconnected, and no data from there is displayed.

There are probably some kind of conflict going on, like one connection disconnecting other one, which seems obvious, but how do I get around it? Thanks!

Matrixgl
01-26-2004, 09:17 PM
Anyone?