Can't select database table even though the code is right

Posted by Lisa on Stack Overflow See other posts from Stack Overflow or by Lisa
Published on 2010-04-30T02:30:09Z Indexed on 2010/04/30 2:37 UTC
Read the original article Hit count: 193

Filed under:
|
|

I am trying to display a list of my vbulliten threads on a non-vbulliten portion of my site. However I can't select the vbulliten database:

<?php

$host   = "localhost";
$user   = "my username";
$pass   = "my password";
$dbname = "tableprefix_forum";

mysql_connect($host, $user, $pass) or die ("Could not connect to database server.");
mysql_select_db($dbname) or die ("Could not select database.");

?>

I am substituting some things here in this example but all my credentials are correct including my db server username, password and forum db name. So what is the problem? Is it due to some internal security feature in vbulliten, does this system not allow you to connect to it's db if the page trying to connect to it is a non-vbulliten page?

© Stack Overflow or respective owner

Related posts about php

Related posts about mysql