Hi,
Installing a new script....
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5
Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/index.php on line 35
Index shows up but with errors.
config file
<?php
include "connect.php";
$settings = mysql_query ('select * from settings');
$settingrecord = mysql_fetch_array($settings);
while ($settingrecord = mysql_fetch_array($settings))
{
switch ($settingrecord["name"])
{
case "sitename":
$sitename = $settingrecord["setting"];
$sitenamesafe = htmlentities($sitename);
break;
case "adminid":
$adminid = $settingrecord["setting"];
break;
case "adminpw":
$adminpw = $settingrecord["setting"];
break;
case "paypal":
$paypal = $settingrecord["setting"];
break;
case "stormpay":
$stormpay = $settingrecord["setting"];
break;
case "safepay":
$safepay = $settingrecord["setting"];
break;
case "solidtrust":
$solidtrust = $settingrecord["setting"];
break;
case "adminemail":
$adminemail = $settingrecord["setting"];
break;
case "prointerval":
$prointerval = $settingrecord["setting"];
break;
case "basecolour":
$basecolour = $settingrecord["setting"];
break;
case "contrastcolour":
$contrastcolour = $settingrecord["setting"];
break;
case "fonttype";
$fonttype = $settingrecord["setting"];
break;
case "fontcolour":
$fontcolour = $settingrecord["setting"];
break;
case "freepost":
$freepost = $settingrecord["setting"];
break;
case "propost":
$propost = $settingrecord["setting"];
break;
case "domain":
$domain = $settingrecord["setting"];
break;
case "com1":
$com1 = $settingrecord["setting"];
break;
case "com2":
$com2 = $settingrecord["setting"];
break;
case "com3":
$com3 = $settingrecord["setting"];
break;
case "com4":
$com4 = $settingrecord["setting"];
break;
case "com5":
$com5 = $settingrecord["setting"];
break;
case "ups":
$ups = $settingrecord["setting"];
break;
case "adminfee":
$adminfee = $settingrecord["setting"];
break;
case "rand":
$rand = $settingrecord["setting"];
break;
case "freecommission" :
$freecommission = $settingrecord["setting"];
break;
case "procommission" :
$procommission = $settingrecord["setting"];
break;
}
}
if( isset($_SESSION['ulogin']) && $_SESSION['ulogin'])
{
$userinfo=mysql_query ("select * from members where userid='".$_SESSION[uname]."'");
$userrecord=mysql_fetch_array($userinfo);
$id=$userrecord["id"];
$name=$userrecord["name"];
$contact_email=$userrecord["contact_email"];
$subscribed_email=$userrecord["subscribed_email"];
$paypal_email=$userrecord["paypal_email"];
$stormpay_email=$userrecord["stormpay_email"];
$safepay_email=$userrecord["safepay_email"];
$solidtrust_email=$userrecord["solidtrust_email"];
$contact_email=$userrecord["contact_email"];
$password=$userrecord["pword"];
$userid=$userrecord["userid"];
$status=$userrecord["status"];
$referid=$userrecord["referid"];
$verified=$userrecord["verified"];
$solos=$userrecord["solos"];
$points=$userrecord["points"];
$commission=$userrecord["commission"];
$ip=$userrecord["ip"];
$joindate=$userrecord["joindate"];
$lastpost=$userrecord["lastpost"];
$subscribed=$userrecord["subscribed"];
$memtype=$userrecord["memtype"];
$up=$userrecord["up"];
$random=$userrecord["random"];
$hits_unique=$userrecord["hits_unique"];
$hits_visitor=$userrecord["hits_visitor"];
}
?>
index file
<?php
include "config.php";
$get_referid = $_GET['referid'];
if (!empty($get_referid)) {
$get_referid = addslashes($get_referid);
if($_COOKIE['referid']!=$get_referid) mysql_query("UPDATE members SET hits_unique=hits_unique+1,hits_visitor=hits_visitor+1 WHERE userid='$get_referid'");
else mysql_query("UPDATE members SET hits_visitor=hits_visitor+1 WHERE userid='$get_referid'");
if(mysql_affected_rows()){
setcookie('referid', $_GET['referid'], time()+365*24*60*60);
setcookie('referrer', $_SERVER['HTTP_REFERER'], time()+365*24*60*60);
}
}
include "header.php";
echo '<center>';
$query1 = "SELECT * FROM pages WHERE name='Index (Main) Page'";
$result1 = mysql_query ($query1);
$line1 = mysql_fetch_array($result1);
$htmlcode = stripslashes($line1["htmlcode"]);
echo $htmlcode;
include "footer.php";
mysql_close($dblink);
?>
Thanks!!
L-D