...

View Full Version : Fatal Error... Please help



king2k5
05-01-2006, 11:08 PM
im getting:


Fatal error: Cannot redeclare class mysqldb in /var/www/html/Login_System_v.2.0/include/database.php on line 14



include("constants.php");

class MySQLDB
{ //This is line 14!
var $connection; //The MySQL database connection
var $num_active_users; //Number of active users viewing site
var $num_active_guests; //Number of active guests viewing site
var $num_members; //Number of signed-up users


Im including this database file in:



<?


$userquery = mysql_query("SELECT * FROM users WHERE username='$session->username' ");
$userrow = mysql_fetch_array($userquery);


$inboxquery = mysql_query("SELECT * FROM messages WHERE player_to='$session->username' OR player_to='".$userrow['id']."' ORDER BY id ASC,subject");
$num_rows = mysql_numrows($inboxquery);
if($num_rows == 0){
echo "You Have No Messages!<br><br>";
echo "<table align=\"right\" width=\"484\"><tr><td><b><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/inbox.php\">Inbox</a></font></b></td>\n";
echo "<td><b><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/compose.php\">Compose</a></font></b></td></tr></table>\n";
$result = mysql_query("UPDATE users SET new_mail='0' WHERE username='$session->username'")
or die(mysql_error());
return;
}
echo "<th>Subject</th><th>Message</th><th>Reply</th><th>Delete</th>";
while ($inboxrow = mysql_fetch_array($inboxquery)) {
echo "<tr><td width=\"75\"><b><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$inboxrow['Subject']."</font></b></td>\n";
echo "<td><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\">".$inboxrow['Message']."<br><br><i>This message was sent by: ".$inboxrow['player_from']."</i></font></td>\n";
echo "<td><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/compose.php?user=".$inboxrow['player_from']."&sub=RE: ".$inboxrow['Subject']."\">Reply</a></font></td>\n";
echo "<td><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/delete.php?id=".$inboxrow['id']."\">Delete</a></font></td></tr>\n";
}

echo "<table align=\"right\" width=\"484\"><tr><td><b><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/inbox.php\">Inbox</a></font></b></td>\n";
echo "<td><b><font size=\"1\" face=\"Verdana, Arial, Helvetica, sans-serif\"><a href=\"http://darkvisions.net/compose.php\">Compose</a></font></b></td></tr></table>\n";

$result = mysql_query("UPDATE users SET new_mail='0' WHERE username='$session->username'")
or die(mysql_error());

?>


If you need any other info please just ask, i would really like to get this problem solved ASAP!

GJay
05-02-2006, 12:43 AM
Where are you including that file?
perhaps try changing any 'include's or 'require's to include_once and require_once...?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum