hey, I'm having a problem. I'm getting the following error : Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /loadsettings.inc.php on line 4 Code (markup): Here is loadsettings.inc.php <?php $result = mysql_query("SELECT * FROM `settings`"); $r = mysql_fetch_array($result); $password = $r['password']; $website = $r['website']; $webtitle = $r['title']; $description = $r['description']; $keywords = $r['keywords']; $maxsizeguest = $r['maxsizeguest']; $maxsizemember = $r['maxsizemember']; $watermark = $r['watermark']; ?> Code (markup): Anyone know whats wrong? Thanks
You need to connect to the database -_- If there is a config file do something like include('config.php'); Code (markup): at the start
Means that no rows were returned. Try this to debug... if(!$result = mysql_query("SELECT * FROM `settings`")) { die(mysql_error()); } $r = mysql_fetch_array($result); PHP:
lmao, ok now i feel dumb. Thanks h0ly and jestep. It was just not connecting to the db, thats all. Dreads solution worked