[MY HABBO FANSITE] PHP ERRORS????

Zephyrus

Wanderer
Sep 28, 2011
336
21
I inserted my sql, and I got this problem

AND ON MY INDEX:

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/paraworl/public_html/test/config.php on line 2

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/paraworl/public_html/test/config.php on line 15

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/paraworl/public_html/test/config.php on line 16

the config:

<?php
$config = mysql_fetch_array(mysql_query("SELECT * FROM config"));

$site[title] = $config["title"];
$site = $config["url"]; $site[admin] = $config["admin"]; $site[forum] = $config["forum"]; $site[forumlink] = $config["forumlink"]; $site = $config["email"]; $site[maintainance] = $config["maintainance"]; $site[an] = $config["admin_notes"]; $stats[users] = mysql_num_rows(mysql_query("SELECT * FROM users")); $stats[news] = mysql_num_rows(mysql_query("SELECT * FROM news")); $stats[news_comments] = mysql_num_rows(mysql_query("SELECT * FROM news_comments")); $stats[spotlight] = mysql_num_rows(mysql_query("SELECT * FROM spotlight")); $user = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE `id` = '$_COOKIE[habsys_id]'")); if($user["id"]){ if($_COOKIE['habsys_password'] == md5($user["password_u"])){ if($_COOKIE['habsys_sec'] == md5($user["ip"])){ $in = mysql_fetch_array(mysql_query("SELECT * FROM users WHERE `id` = '$_COOKIE[habsys_id]'")); } } } if($site[maintainance] == '1' && $in["rank"] !== 'Administrator'){ header("Location: maintainance.php"); } ?> [/B][/B]
 
Last edited:

GarettM

Posting Freak
Aug 5, 2010
833
136
Don't use standard mysql extension. Use PDO or Mysqli. Google
Code:
PHP Mysqli class
You'll find something. Also I can help if you fix the thread and use the CODE bb
 

Users who are viewing this thread

Top