Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jan 2006
    Posts
    189
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Fatal Error... Please help

    im getting:

    Code:
    Fatal error: Cannot redeclare class mysqldb in /var/www/html/Login_System_v.2.0/include/database.php on line 14
    PHP Code:
    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:

    PHP Code:
    <?


    $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!

  • #2
    Senior Coder
    Join Date
    Sep 2005
    Posts
    1,791
    Thanks
    5
    Thanked 36 Times in 35 Posts
    Where are you including that file?
    perhaps try changing any 'include's or 'require's to include_once and require_once...?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •