Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rickman/public_html/cype/config/properties.php on line 31
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rickman/public_html/cype/config/afuncs.php on line 39
Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/rickman/public_html/cype/config/afuncs.php on line 39
I solved, I read another thread, and found to put "or die(mysql_error());" at the end, then found my error. and it's corrected now.
Thanks though
I get those errors with a script that I'm working with. This is a premade script, but I made some major edits to it, but I did not edit the pages properties.php and afuncs.php
I don't notice anything wrong with my page, but, I just have those errors.
Here's the sources to the page properties.php
PHP Code:
<?php
if(basename($_SERVER["PHP_SELF"]) == "properties.php"){
die("403 - Access Forbidden");
}
/* Site Controls */
$properties = mysql_query("SELECT * FROM cype_properties");
$prop = mysql_fetch_array($properties);
$ipaddress = isset($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR'];
if(isset($_SESSION['id'])){
$getsty = mysql_query("SELECT * FROM accounts WHERE id=".$_SESSION['id']."");
$showsty = mysql_fetch_array($getsty);
if($showsty['style'] == NULL){
$style = "1";
}else{
$style = $showsty['style'];
}
$getstyle = mysql_query("SELECT * FROM cype_styles WHERE id=".$style."");
$showstyle = mysql_fetch_array($getstyle);
}
/* Name of server */
$servername = $prop['name'];
/* Site title */
$sitetitle = $prop['title'];
$pb = " (Powered by Cype)";
/* Download link for client */
$client = $prop['client'];
/* Server Version */
$version = $prop['version'];
/* Forum url*/
$forumurl = $prop['forumurl'];
/* Site url */
$siteurl = $prop['siteurl'];
/* Cype Dir */
$cypedir = $prop['cypedir'];
/* Email */
$adminemail = $prop['email'];
/* Vote Link */
$vote = $prop['vote'];
/* Vote Enabled */
$vcheck = $prop['vcheck'];
/* Vote Banner Link */
$vbanner = $prop['vbanner'];
/* Server Rates */
$exprate = $prop['exprate'];
$mesorate = $prop['mesorate'];
$droprate = $prop['droprate'];
/* Middle Banner Link */
$mbanner = $prop['mbanner'];
/* Middle Link */
$mblink = $prop['mblink'];
/* Menu Message */
$message = $prop['message'];
/* Flood Prevention */
$cypeflood = $prop['flood'];
/* Flood Interval */
$cypefloodint = $prop['floodint'];
/* Scrolling Message */
$scroller = $prop['scroller'];
/* Level for GMs and up */
$gmlevel = $prop['gmlevel'];
/* Player Cap */
$pcap = $prop['pcap'];
/* Accounts Per IP */
$MaxAcc = $prop['maxaccounts'];
/* Where is the style located? */
if(isset($_SESSION['id'])){
$styledir = $showstyle['dir'];
}else{
$styledir = $prop['styledir'];
}
$censored = array("****","dick","fail","suck","****","*****","******","***","****","vagina","*****","****");
?>
If you need more info just ask for them.
Comment