I'm using the same script I used to connect to my database as on my other page, but for some reason it's giving my a connection error with this one. The only differences between the two are that they're in different directories, and the other one uses a login script with sessions, and this one is just flat out taking the information from the database.
include("http://www.doghousecomics.com/member/database.php");
$cwd = basename(getcwd());
$query="SELECT * FROM users WHERE username='$cwd'";
$result= mysql_query($query) or die('MySQL error: ' . mysql_error() . '<br/>Query: ' . $query);
while ($row = mysql_fetch_array($result, MYSQL_ASSOC)) {
$title=$row['title'];
$name=$row['name'];
$extension=$row['extension'];
$email=$row['email'];
}
I don't know what I could be doing wrong here.
the error it gives me is:
MySQL error: Can't connect to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)
Query: SELECT * FROM users WHERE username='doghousecomics'