Hi,
I'm having some weirdness with my site redesign, and I've no idea what's happening.
When a visitor arrives, the site checks to see if they're logged in using logincheck.inc. That's all fine by and large. When they're logged in it displays a welcome message, when they're not it shows the login form.
This works on most of the pages
For some reason on a couple of them it says "Error - no database selected" - but the db is selected, and is using identical code to every other working page.
Any ideas what might be causing this?
logincheck.inc says:
require_once("memconn.php");
memconn.php then says:
$host = 'localhost';
$user = 'user';
$pass = 'pass';
$name = 'membership';
$conn = mysql_connect($host, $user, $pass) or die ('Error connecting to mysql');
mysql_select_db($name,$conn);
Like I say, this works fine on virtually every page apart from a couple, and I don't konw why!
Is it significant that it's in a subdirectory?