Somebody please help fix my error.
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'session_start ()' at line 1
Code is as follows:
session_start ();
if (!$stop_eval)
{
global $c;
if(is_dir('install/'))
{
header("Location: install/");
}
if(defined('DB_DETAILS') && $c && !$error_log) {
if(!$_SESSION['setting'])
{
$setq = mysql_query("SELECT * FROM settings");
while($r=mysql_fetch_array($setq))
{
$set[$r[set_name]] = $r['set_value'];
$_SESSION['setting'][$r[set_name]] = $r['set_value'];
}
} else {
$set = $_SESSION['setting'];
}
if(!is_array($set))
{
die("An error occured while trying to process the settings, Please re-
access the site later or consult the administrator.");
}
When i go to load my website thats the error i get, it reads:
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/MyUserName/public_html/lib/configuration.php on line 31
An error occured while trying to process the settings, Please re- access the site later or consult the administrator.