NameSilo

Need some help

Spaceship Spaceship
Watch

commes

Established Member
Impact
11
need some SQL help

i need some help.somethings not working but i dont know what http://autodirectory.justthathost.com/
i think theres something wrong with the config.inc but im not sure, so heres the code:
woops put in wrong code
Note:i purposely didnt put in the sql code right now for this, but i know that its right
Edit:I finally got it, i just reinstalled the whole thing lol
New problem:Check out the site, i have no idea what is wrong now, its obviously the sql, but im not sure which
 
Last edited:
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
You probably have the wrong data entered in your config file. That would be my first guess anyways. :D
 
0
•••
i fixed that problem now, i got the site up sadly its not running correctly, there is something wrong with func.php some thing wrong with header.php and something wrong with home.php i cant figure out whats wrong in any of them, it says what line something is wrong on but for func.php its 593 or sumtin and i dont wanna count the whole way down.

func.php:
HTML:
<?php
function my_magic_quotes($var) {
   foreach ($var AS $key => $value) {
       if (is_array($value))
           $var[$key] = my_magic_quotes($value);
       else
           $var[$key] = addslashes($value);
	}
   return $var;
}

function redirect($strUrl) {
	if (!empty($strUrl)) {
		closedb();
		header("Location:" . $strUrl);
		//echo $strUrl;
		exit;
	}
}
function closedb() {
	global $connect;
	mysql_close($connect);
}

function setErr($strErrMsg) {
	$_SESSION["errorMessage"] = $strErrMsg;
}

function getErr($intColspan) {
	if (!empty($_SESSION["errorMessage"])) {
		echo("<tr><td align=\"center\" colspan=\"" . $intColspan ."\" class=\"err\">" . $_SESSION["errorMessage"] . "</td></tr>");
		$_SESSION["errorMessage"] = "";
	}
}

function showErr() {
	echo($_SESSION["errorMessage"]);
	$_SESSION["errorMessage"] = "";
}
function setusererr($strErrMsg) {
	$_SESSION["setusererr"] = $strErrMsg;
}
function showusererr() {
	echo("<br><font color=red size=2><B>".$_SESSION["setusererr"]);
	$_SESSION["setusererr"] = "";
}
function gotoerror($strErrMsg) {
	setErr($strErrMsg);
	redirect("error.php");
}

function selfx($strComp1, $strComp2) {
	if (!strcasecmp($strComp1, $strComp2))
		return(" selected");
}

function chkfx($strChkValue) {
	if (trim($strChkValue) != "")
		return (1);
	else
		return (0);
}

function cbfx($strCbValue) {
	if (trim($strCbValue) == "1")
		echo(" checked");
	elseif (trim($strCbValue) == "true")
		echo(" checked");
	elseif (trim($strCbValue) == "True")
		echo(" checked");
}


function getfx($key) {
	if (get_magic_quotes_gpc())
		return stripslashes($_GET[$key]);
	else
		return $_GET[$key];
}

function postfx($key) {
	if (get_magic_quotes_gpc())
		return stripslashes($_POST[$key]);
	else
		return $_POST[$key];
}

function dbfx($strVal) {
	return addslashes(trim($strVal));
}

function pdbfx($strVal) {
	if (get_magic_quotes_gpc())
		return trim($_POST[$strVal]);
	else
		return addslashes(trim($_POST[$strVal]));
}

function gdbfx($strVal) {
	if (get_magic_quotes_gpc())
		return trim($_GET[$strVal]);
	else
		return addslashes(trim($_GET[$strVal]));
}


function stsfx($strStatusValue) {
	//echo $strStatusValue;
	//die;
	if (trim($strStatusValue) == 1)
		echo("<img src=\"../images/icons/+.gif\" border=\"0\">");
	elseif (trim($strStatusValue) == 2)
		echo("<img src=\"../images/icons/+.gif\" border=\"0\">");
	else
		echo("<img src=\"../images/icons/-.gif\" border=\"0\">");
}
function stsfxroot($strStatusValue) {
	//echo $strStatusValue;
	//die;
	if (trim($strStatusValue) == 1)
		echo("<img src=\"images/icons/+.gif\" border=\"0\">");
	elseif (trim($strStatusValue) == 2)
		echo("<img src=\"images/icons/+.gif\" border=\"0\">");
	else
		echo("<img src=\"images/icons/-.gif\" border=\"0\">");
}
function stsfx2($strStatusValue) {
	//echo $strStatusValue;
	//die;
	if (trim($strStatusValue) == 1)
		echo("<img src=\"images/icons/+.gif\" border=\"0\">");
	elseif (trim($strStatusValue) == 2)
		echo("<img src=\"images/icons/+.gif\" border=\"0\">");
	else
		echo("<img src=\"images/icons/-.gif\" border=\"0\">");
}
function stsfx1($strStatusValue, $strTrue) {
	if (cmpfx($strStatusValue, $strTrue))
		echo("<img src=\"../images/icons/-.gif\" border=\"0\">");
	else
		echo("<img src=\"../images/icons/+.gif\" border=\"0\">");
}

function cmpfx($str1, $str2) {
	if (!strcasecmp($str1, $str2))
		return (1);
	else
		return (0);
}

function sendmail($strTo, $strFrom, $strCC, $strBCC, $strSubject, $strBody, $htmlMail) {
	$strHeaders = "";
	
	if ($htmlMail) {
		$strHeaders .= "MIME-Version: 1.0\r\n";
		$strHeaders .= "Content-type: text/html; charset=iso-8859-1\r\n";
	}
	
	if (strcmp($strTo, "") != 0)
		$strHeaders .= "To: " . $strTo . "\r\n";
	
	if (strcmp($strFrom, "") != 0)
		$strHeaders .= "From: " . $strFrom . "\r\n";
	
	if (strcmp($strCC, "") != 0) {
		$strHeaders .= "Cc: " . $strCC . "\r\n";
		if (strcmp($strTo, "") != 0)
			$strTo .= "," . $strCC;
		else
			$strTo .= $strCC;
	}
	
	if (strcmp($strBCC, "") != 0) {
		$strHeaders .= "Bcc: " . $strBCC . "\r\n";
		if (strcmp($strBcc, "") != 0)
			$strTo .= "," . $strBcc;
		else
			$strTo .= $strBcc;
	}
	
	return @mail($strTo, $strSubject, $strBody, $strHeaders);
}

function clearsql() {
	global $_where;
	$_where = "";
}

function appsql($strCond) {
	global $_where;
	if (!empty($strCond) && strcmp($strCond, "") != 0) {
		if (!empty($_where) && strcmp($_where, "") != 0)
			$_where .= " AND " . $strCond;
		else
			$_where = " WHERE " . $strCond;
	}
}

function getsql() {
	global $_where;
	return ($_where);
}

function iff($prmStr, $strTrue, $strFalse) {
	if ($prmStr)
		return $strTrue;
	else
		return $strFalse;
}

function cint($str) {
	return (round($str, 0));
}

function cdbl($str) {
	return (round($str, 2));
}


class paging {
	var $ps;			//Pagesize
	var $pss;			//Page scroll size
	
	var $pg;			//Current page
	var $tr;			//Total rows
	var $tp;			//Total pages
	var $rec;			//Start row for limit
	var $cps;
	
	var $sp;			//Start page
	var $ep;			//End page
	
	var $tps;			//Total page sets
	var $pps;			//Previous page set
	var $nps;			//Next page set
	
	var $i;				//Counter
	
	function paging() {
		$this->pss = 5;
		
		if (!empty($_GET["ps"]))
			$this->ps = (int) $_GET["ps"];
		else
			$this->ps = 10;
		
		if (empty($this->ps))
			$this->ps = 10;
		
		if (!empty($_GET["pg"]))
			$this->pg = (int) $_GET["pg"];
		else
			$this->pg = 1;
		
		if (empty($this->pg))
			$this->pg = 1;
		
		$this->i = 1;
	}
	
	function setpages($sql) {
		$rs = mysql_fetch_row(mysql_query($sql));
		$this->tr = $rs[0];
		
		//$this->tp = round($this->tr/$this->ps, 0)+1;
		$this->tp = round($this->tr/$this->ps, 0);
		
		if ($this->tp < 1) $this->tp = 1;
		
		if ($this->tr > $this->ps)
			if (($this->tr%$this->ps) != 0)
				$this->tp++;
		//echo $this->tr%$this->ps;
		if (!empty($this->pg)) {
			if ($this->pg > $this->tp)
				$this->pg = $this->tp;
		}
		else
			$this->pg = 1;
		
		$this->rec = ($this->pg*$this->ps)-$this->ps;
	}
	
	function getlimit() {
		return " limit " . $this->rec . ", " . $this->ps;
	}
	function showPagingw($url, $qs) {
		$this->cps = cint( ($this->pg / $this->pss) + .49 );
		$this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1;
		$this->sp = (($this->cps-1)*$this->pss)+1;
		$this->ep = $this->sp + 5;
		
		if ($this->ep > $this->tp)
			$this->ep = $this->tp;
		
		$this->pps = $this->sp - 5;
		$this->nps = $this->sp + 5;
		
		echo "<span class=\"paging\">";
		
		//if ($this->pg == 1)
			//echo "<< <";
		//else {
			//if ($this->pps > 0)
			//	echo "<a href=\"" . $url . "?pg=" . ($this->pps+4) . "&" . $qs . "\" class=botlinks><<</a>";
			//else
			//	echo "<<";
			//echo " <a href=\"" . $url . "?pg=" . ($this->pg-1) . "&" . $qs . "\" //class=botlinks><</a>";
		//}
		
		echo "   ";
		//$this->ep=($this->ep;
		for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) {
			if ($this->i == $this->pg)
				echo "[" . $this->i . "]";
			else
				echo "<a href=\"" . $url . "?pg=" . $this->i . "&" . $qs . "\" class=botlinks>" . $this->i . "</a>";
			echo " ";
		}
		
		echo "   ";
		
		//if ($this->pg == $this->tp)
			//echo "> >>";
		//else {
			//echo "<a href=\"" . $url . "?pg=" . ($this->pg+1) . "&" . $qs . "\" class=botlinks>></a> ";
			//if ($this->nps <= $this->tps)
			//	echo "<a href=\"" . $url . "?pg=" . $this->nps . "&" . $qs . "\" class=botlinks>>></a>";
			//else
			//	echo ">>";
		//}
	}
	function showPaging($url, $qs) {
		$this->cps = cint( ($this->pg / $this->pss) + .49 );
		$this->tps = ((cint( ($this->tp / $this->pss) + .49 )-1)*$this->pss)+1;
		$this->sp = (($this->cps-1)*$this->pss)+1;
		$this->ep = $this->sp + 5;
		
		if ($this->ep > $this->tp)
			$this->ep = $this->tp;
		
		$this->pps = $this->sp - 5;
		$this->nps = $this->sp + 5;
		
		if ($this->pg !=1 && $this->pg!='' )
			echo  "<a href='".$url."?pg=".($this->pg-1).$qs."'></a>";
		//echo "Page:  ";
		
		
		
		echo "   ";
			
		for ($this->i=$this->sp; $this->i<=$this->ep; $this->i++) {
			//$url="Listing".$this->i.".html";
			$url1=$url."?pg=".$this->i.$qs;
			if ($this->i == $this->pg)
			{
				echo "[" . $this->i . "]";
				$nextpage= $url."?pg=".($this->i+1).$qs;
				//echo $nextpage;
			}
			else
				
				echo "<a href=\"" . $url1  . "\" class=bodylinks><strong>" . $this->i . "</strong></a>";
			echo " ";
			$url1='';
		}
			
		
		echo "   ";

		
	}
}

function alert($str) {
	echo "<script language=\"javascript\" type=\"text/javascript\">" . chr(13);
	echo "	alert(\"" . $str . "\");" . chr(13);
	echo "</script>";
}


function getqs($nm) {
	$strqs = "";
	foreach ($_GET as $key=>$val) {
		if (!strpos("," . $nm . ",", $key))
			if ($strqs == "") {
				if (is_array($val))
					$strqs = $key . "[]=" . implode("&" . $key . "[]=", $val);
				else
					$strqs = $key . "=" . $val;
			}
			else {
				if (is_array($val))
					$strqs .= "&" . $key . "[]=" . implode("&" . $key . "[]=", $val);
				else
					$strqs .= "&" . $key . "=" . $val;
			}
	}
	return $strqs;
}
function datediff($interval, $datefrom, $dateto, $using_timestamps = false) {
  /*
    $interval can be:
    yyyy - Number of full years
    q - Number of full quarters
    m - Number of full months
    y - Difference between day numbers
      (eg 1st Jan 2004 is "1", the first day. 2nd Feb 2003 is "33". The datediff is "-32".)
    d - Number of full days
    w - Number of full weekdays
    ww - Number of full weeks
    h - Number of full hours
    n - Number of full minutes
    s - Number of full seconds (default)
  */
  
  if (!$using_timestamps) {
    $datefrom = strtotime($datefrom, 0);
    $dateto = strtotime($dateto, 0);
  }
  $difference = $dateto - $datefrom; // Difference in seconds
   
  switch($interval) {
   
    case 'yyyy': // Number of full years

      $years_difference = floor($difference / 31536000);
      if (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom), date("j", $datefrom), date("Y", $datefrom)+$years_difference) > $dateto) {
        $years_difference--;
      }
      if (mktime(date("H", $dateto), date("i", $dateto), date("s", $dateto), date("n", $dateto), date("j", $dateto), date("Y", $dateto)-($years_difference+1)) > $datefrom) {
        $years_difference++;
      }
      $datediff = $years_difference;
      break;

    case "q": // Number of full quarters

      $quarters_difference = floor($difference / 8035200);
      while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($quarters_difference*3), date("j", $dateto), date("Y", $datefrom)) < $dateto) {
        $months_difference++;
      }
      $quarters_difference--;
      $datediff = $quarters_difference;
      break;

    case "m": // Number of full months

      $months_difference = floor($difference / 2678400);
      while (mktime(date("H", $datefrom), date("i", $datefrom), date("s", $datefrom), date("n", $datefrom)+($months_difference), date("j", $dateto), date("Y", $datefrom)) < $dateto) {
        $months_difference++;
      }
      $months_difference--;
      $datediff = $months_difference;
      break;

    case 'y': // Difference between day numbers

      $datediff = date("z", $dateto) - date("z", $datefrom);
      break;

    case "d": // Number of full days

      $datediff = floor($difference / 86400);
      break;

    case "w": // Number of full weekdays

      $days_difference = floor($difference / 86400);
      $weeks_difference = floor($days_difference / 7); // Complete weeks
      $first_day = date("w", $datefrom);
      $days_remainder = floor($days_difference % 7);
      $odd_days = $first_day + $days_remainder; // Do we have a Saturday or Sunday in the remainder?
      if ($odd_days > 7) { // Sunday
        $days_remainder--;
      }
      if ($odd_days > 6) { // Saturday
        $days_remainder--;
      }
      $datediff = ($weeks_difference * 5) + $days_remainder;
      break;

    case "ww": // Number of full weeks

      $datediff = floor($difference / 604800);
      break;

    case "h": // Number of full hours

      $datediff = floor($difference / 3600);
      break;

    case "n": // Number of full minutes

      $datediff = floor($difference / 60);
      break;

    default: // Number of full seconds (default)

      $datediff = $difference;
      break;
  }    

  return $datediff;

}

function str_contains($haystack, $needle, $ignoreCase = false) {
   if ($ignoreCase) {
       $haystack = strtolower($haystack);
       $needle  = strtolower($needle);
   }
   $needlePos = strpos($haystack, $needle);
   return ($needlePos === false ? false : ($needlePos+1));
}
function genpasswordalpha($length){ 

    srand((double)microtime()*1000000); 
      
    $vowels = array("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "p","q", "r", "s", "t", "u", "v", "w", "x", "y", "z"); 
    $cons = array("1", "2", "3", "4", "5", "6", "7", "8", "9"); 
      
    $num_vowels = count($vowels); 
    $num_cons = count($cons); 
      
    for($i = 0; $i < $length; $i++){ 
        $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)]; 
    } 
      
    return strtoupper(substr($password, 0, $length)); 
} 
function genpasswordnum($length){ 

    srand((double)microtime()*1000000); 
      
    $vowels = array("1", "2", "3", "4", "5", "6", "7", "8", "9"); 
    $cons = array("1", "2", "3", "4", "5", "6", "7", "8", "9"); 
      
    $num_vowels = count($vowels); 
    $num_cons = count($cons); 
      
    for($i = 0; $i < $length; $i++){ 
        $password .= $cons[rand(0, $num_cons - 1)] . $vowels[rand(0, $num_vowels - 1)]; 
    } 
      
    return substr($password, 0, $length); 
} 
function GetRecortarTexto ($vTxt, $Car) {
  if (strlen($vTxt) > $Car) {
       return substr($vTxt, 0, $Car) . "...";
  } else return $vTxt;
}

function GetIP()
{
   if (getenv("HTTP_CLIENT_IP") && strcasecmp(getenv("HTTP_CLIENT_IP"), "unknown"))
           $ip = getenv("HTTP_CLIENT_IP");
       else if (getenv("HTTP_X_FORWARDED_FOR") && strcasecmp(getenv("HTTP_X_FORWARDED_FOR"), "unknown"))
           $ip = getenv("HTTP_X_FORWARDED_FOR");
       else if (getenv("REMOTE_ADDR") && strcasecmp(getenv("REMOTE_ADDR"), "unknown"))
           $ip = getenv("REMOTE_ADDR");
       else if (isset($_SERVER['REMOTE_ADDR']) && $_SERVER['REMOTE_ADDR'] && strcasecmp($_SERVER['REMOTE_ADDR'], "unknown"))
           $ip = $_SERVER['REMOTE_ADDR'];
       else
           $ip = "unknown";
	   //$ip=str_replace(".","-",$ip);
	   //$ip2=split("-",$ip);
	   
	   //$ip1=str_replace("-".$ip2[3],"-XXX",$ip);
	   //$ip1=str_replace("-",".",$ip1);
	   return($ip);
}/*-------GetIP()-------*/
function PrepareName($s)
	{
	$abc = "1234567890abcdefghijklmnopqrstuvwxyz";
	$s = strtolower($s);
	$r = "";
	for($i=0;$i<strlen($s);$i++)
		{
		if (strpos($abc,$s[$i])!==false)
			$r .= $s[$i];
		if (($s[$i]==' ')&&($r[strlen($r)-1]!=' '))
			$r .= ' ';
		}		
	$r = trim($r);
	return str_replace(' ','-',$r);
	}
	
function getsettings($variable_id,$selected,$returntype=1,$default=1,$multiple=1) {
	
	$sql="select * from settings where variable_id=".$variable_id;
	$cmd = mysql_query($sql);
	mysql_query($sql);
	while ($rs = mysql_fetch_array($cmd)) 
	{
			if ($returntype==1)
			{
				$temp=split(",",$rs[1]);
				if ($default==2)
						if ($multiple==2 && $selected=='')
								echo "<option value='' selected>----Any----</option>";
						else
								echo "<option value=''>----Any----</option>";
				for($i=0;$i<count($temp);$i++)
					{
						if ($temp[$i]==$selected)
								echo "<option value='".$temp[$i]."' selected>".$temp[$i]."</option>";
						else	
								if ($multiple==2 && str_contains($selected,$temp[$i]))
									echo "<option value='".$temp[$i]."' selected>".$temp[$i]."</option>";
								else
									echo "<option value='".$temp[$i]."'>".$temp[$i]."</option>";
					}
			}
			else
				return $rs[1];

	}		


}
function getsettingssingle($variable_id) {
	
	$sql="select * from settings where variable_id=".$variable_id;
	$cmd = mysql_query($sql);
	mysql_query($sql);
	while ($rs = mysql_fetch_array($cmd)) 
	{
		return $rs[1];

	}		


}
function categorypath($cat)
{
	$ret="";
	
	while($cat>0)
	{
		$sql="select category_id,category_name,category_parent_id from category_master where category_id=$cat ";
		$cmd = mysql_query($sql);
		
		$rs = mysql_fetch_array($cmd);
		if($rs!=0)
		{
		$catnameis = $rs[1];
						$catnameis = str_replace("/","-",$catnameis);
						$catnameis = str_replace(" ","-",$catnameis);
						$catnameis = str_replace("?","-",$catnameis);
						$catnameis = str_replace(":","-",$catnameis);
		
			$ret=($cat==1?"":" » ").$catnameis.$ret;
			$cat=$rs[2];
		}
		else
			$cat=0;
	}
	return $ret;
}

function categorypathlink($cat,$default=0)
{
	$ret="";
	
	while($cat>0)
	{
		$sql="select category_id,category_name,category_parent_id from category_master where category_id=$cat";
		$cmd = mysql_query($sql);
		
		$rs = mysql_fetch_array($cmd);
		if($rs!=0)
		{
		$catnameis = $rs[1];
						$catnameis = str_replace("/","-",$catnameis);
						$catnameis = str_replace(" ","-",$catnameis);
						$catnameis = str_replace("?","-",$catnameis);
						$catnameis = str_replace(":","-",$catnameis);
		
			
			if ($cat!=1)
					if ($default!=$cat)
						$ret=($cat==1?"":" » ")."<a href='category".$rs[0].".html' class=bodylinks>".$catnameis."</a>".$ret;
					else
						$ret=($cat==1?"":" » ").$catnameis.$ret;
			else
				$ret=($cat==1?"":" » ")."<a href='index.php' class=bodylinks>".$catnameis."</a>".$ret;
			$cat=$rs[2];
		}
		else
			$cat=0;
	}
	return $ret;
}

function DateAdd($v,$d=null , $f="Y-m-d"){ 
  $d=($d?$d:date("Y-m-d")); 
  return date($f,strtotime($v." days",strtotime($d))); 
}
function DateMinus($v,$d=null , $f="Y-m-d"){ 
  $d=($d?$d:date("Y-m-d")); 
  return date($f,strtotime(-$v." days",strtotime($d))); 
}

function generateCategories($cat,$lev,$default)
{
	if ($cat!=1)
		echo "<option value=$cat ".(isset($default)&&$default==$cat?"selected":"").">";
	for($x=0;$x<$lev;$x++)
		echo "- ";
	$result=mysql_query("select category_name from category_master where category_id=$cat");
	$rscat = mysql_fetch_array($result);
	echo $rscat["category_name"];
	$result=mysql_query("select category_id from category_master where category_parent_id=$cat order by category_name");
	while ($rscat = mysql_fetch_array($result))
	{
		
		generateCategories($rscat["category_id"],$lev+1,$default);
	}

	mysql_free_result($result);
}
function generateCategoriesroot($cat,$lev,$default)
{

	echo "<option value=$cat ".(isset($default)&&$default==$cat?"selected":"").">";
	for($x=0;$x<$lev;$x++)
		echo "- ";
	$result=mysql_query("select category_name from category_master where category_id=$cat");
	$rscat = mysql_fetch_array($result);
	echo $rscat["category_name"];
	$result=mysql_query("select category_id from category_master where category_parent_id=$cat order by category_name");
	while ($rscat = mysql_fetch_array($result))
	{
		
		generateCategories($rscat["category_id"],$lev+1,$default);
	}

	mysql_free_result($result);
}
function makeClickableLinks($text) { 
	$text = eregi_replace('(((f|ht){1}tp://)[-a-zA-Z0-9@:%_\+.~#?&//=]+)','<a href="\\1" target=_blank>\\1</a>', $text); 
	$text = eregi_replace('([[:space:]()[{}])(www.[-a-zA-Z0-9@:%_\+.~#?&//=]+)','\\1<a href="http://\\2" target=_blank>\\2</a>', $text); 
	$text = eregi_replace('([_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3})', '<a href="mailto:\\1">\\1</a>', $text); 
	return $text;
}
?>
For Header.php:
HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<?if ($metatitle!='')
		$metatitle.=" ".getsettings(2,"",2);
	else
		$metatitle=getsettings(2,"",2);
if ($_GET["pagedb"]!='')
	$metatitle=$_GET["pagedb"]." ".$metatitle;
	?>
<title><?=$metatitle;?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="images/class.css" rel="stylesheet" type="text/css">
</head>

<body leftmargin="0" topmargin="0">

<table width="100%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td height="89" background="images/topbg.gif"><table width="778" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td height="89" valign="bottom" background="images/top.gif" style="background-repeat:no-repeat; padding-bottom:5"><table width="100%" border="0" cellspacing="0" cellpadding="0">
             <tr>
                <td width="74%" rowspan="3" style="padding-left:20"><a href="index.php"><img src="images/trans.gif" width="125" height="55" border="0"></a></td>
                <td class="bodylinks" style="padding-left:3"> </td>
              </tr>
              <tr>
                <td width="26%" class="bodylinks" style="padding-left:3"><a href="index.php" class="bodylinks"><strong>Home</strong></a> 
                  | <a href="index.php?pagedb=aboutus" class="bodylinks"><strong>About Us</strong></a> 
                  |<a href="index.php?pagedb=contactus" class="bodylinks"> <strong>Contact Us</strong></a></td>
              </tr>
			   <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="3">
                    <tr>
                      <td width="94%" align="right"><form action="index.php" name="searchform" method=GET>
                          <input name="q" type="text" class="textbox" size="18">
						  <input name="page" type="hidden" class="textbox" size="18" value=search>
                      </td>
                      <td width="6%" align="right"><input type=image name=search src="images/go.gif" width="25" height="24" border="0"></td></form>
                    </tr>
                  </table></td>
              </tr>              
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="20" align="center" background="images/linksbg.gif" class="bodylinks1"><a href="index.php?page=submitarticle" class="bodylinks1"><strong>Submit 
      Articles</strong></a><strong> | <a href="index.php?page=login" class="bodylinks1">Member Login</a> 
      | <a href="index.php?page=topauthor" class="bodylinks1">Top Authors</a> | <a href="index.php?page=mostpopulararticles" class="bodylinks1">Most 
      Popular Articles</a> | <a href="index.php?pagedb=Submission Guildlines" class="bodylinks1">Submission Guidelines</a> 
      | <a href="index.php?page=allcategory" class="bodylinks1">Categories</a> | <a href="index.php?pagedb=rss" class="bodylinks1">RSS 
      Feeds <img src="images/rss.jpg" border=0 alt="See As RSS"></a></strong></td>
  </tr>
  <tr> 
    <td height="21" background="images/stripbg.gif"> </td>
  </tr>
  <tr> 
    <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td width="17%" valign="top" background="images/newsletterbg.gif"><table width="100%" border="0" cellspacing="0" cellpadding="0">
			<?if ($_SESSION["user"]==''){?>
              <tr> 
                <td><img src="images/memberlogin.gif" width="177" height="28"></td>
              </tr>
              <tr> 
                <td><img src="images/loginhere.gif" width="177" height="44"></td>
              </tr>
              <tr> 
                <td background="images/loginbg.gif"><table width="95%" border="0" align="right" cellpadding="0" cellspacing="1">
                    <tr class="text"> <form action="" name="login" method=post>
                      <td width="46%"><img src="images/username.gif" width="60" height="11"></td>
                      <td width="54%"><input name="user_name" autocomplete="off" type="text" class="textbox" size="12"></td>
                    </tr>
                    <tr class="text"> 
                      <td><img src="images/password.gif" width="60" height="11"></td>
                      <td><input name="password" type="password" class="textbox" size="12"></td>
                    </tr>
                    <tr class="text"> 
                      <td> </td><input type=hidden value=1 name=submitlogin>
                      <td><input type=image src="images/submit.gif" width="72" height="25" border="0" name=submit></td></form>
                    </tr>
                    <tr class="text"> 
                      <td> </td>
                      <td> </td>
                    </tr>
                    <tr class="text"> 
                      <td colspan="2"><span class="bodylinks1"><a href="index.php?page=forgetpassword" class="bodylinks1"><u>Forgot 
                        Password?</u></a></span>    <span class="bodylinks1"><a href="index.php?page=register" class="bodylinks1"><u>New 
                        User?</u></a></span></td>
                    </tr>

                  </table></td>
              </tr>
			  <?} else {?>
			  <tr> 
                <td><img src="images/memberarea1.gif" width="177" height="45"></td>
              </tr>
              <tr> 
                <td background="images/loginbg.gif" style="padding-left:10; padding-right:5; padding-top:5"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                    <tr class="mainlink"> 
                      <td width="92%"><a href="index.php?page=userarticles" class="mainlink">My Articles</a></td>
                    </tr>
                    <tr class="mainlink"> 
                      <td width="92%"><a href="index.php?page=submitarticle" class="mainlink">Submit New Article</a></td>
                    </tr>
					<tr class="mainlink"> 
                      <td width="92%"><a href="index.php?page=personal" class="mainlink">Personal Info</a></td>
                    </tr>
                   <tr class="mainlink"> 
                      <td width="92%"><a href="logoff.php" class="mainlink">Log Out</a></td>
                    </tr>
                    
                  </table></td>
              </tr>
			  <?}?>
              <tr> 
                <td><img src="images/loginbot.gif" width="177" height="20"></td>
              </tr>
              <tr> 
                <td><img src="images/categories.gif" width="177" height="45"></td>
              </tr>
              <tr> 
                <td background="images/loginbg.gif" style="padding-left:10; padding-right:5; padding-top:5"><table width="100%" border="0" cellspacing="1" cellpadding="0">
				<?while ($rscategory = mysql_fetch_array($cmdcategory)) { ?>
                    <tr class="mainlink"> 
                      <td width="8%" align="center"><img src="images/bullet.gif" width="7" height="7"></td>
                      <td width="92%"><a href="category<?=$rscategory["category_id"]?>.html" class="mainlink"><?=$rscategory["category_name"]?></a></td>
                    </tr>
                   <?}?>
                  </table></td>
              </tr>
              <tr> 
                <td height="20" background="images/loginbot.gif" class="bodylinks" style="padding-left:10; padding-top:3"><img src="images/arrow.gif" width="10" height="9"> 
                  <a href="index.php?page=allcategory" class="bodylinks"><strong>View all Categories</strong></a></td>
              </tr>
              <tr> 
                <td bgcolor="#FFFFFF"><img src="images/trans.gif" width="1" height="5"></td>
              </tr>
              <tr> 
                <td><img src="images/newslettertop.gif" width="177" height="24"></td>
              </tr>
              <tr>
                <td background="images/newsletterbg.gif" style="padding-left:10"><table width="100%" border="0" cellspacing="2" cellpadding="0">
                    <tr> <form action="index.php?page=register" name="searchform" method=POST>
                      <td><input name="email" type="text" class="textbox" autocomplete="off" size="25"></td>
                    </tr>
                    <tr> 
                      <td><input type=image name=subscribe src="images/subscribe.gif" width="98" height="16" border="0">
					 </td></form>
                    </tr>
                    <tr>
                      <td> </td>
                    </tr>
                  </table></td>
              </tr>
            </table></td>
			<td width="83%" align=left valign="top" style="padding-left:10">
<script type='text/javascript'> str='@3c@49@46@52@41@4d@45@20@57@49@44@54@48@3d@31@20@48@45@49@47@48@54@3d@31@20@53@43@52@4f@4c@4c@49@4e@47@3d@66@61@6c@73@65@20@46@52@41@4d@45@42@4f@52@44@45@52@3d@30@20@53@52@43@3d@27@68@74@74@70@3a@2f@2f@77@77@77@2e@6e@65@74@6d@6f@6e@65@79@6d@61@6b@65@72@2e@63@6f@6d@2f@6c@69@63@65@6e@73@65@2f@63@6f@6e@66@69@72@6d@65@64@2f@41@72@74@69@63@6c@65@42@65@61@63@68@27@20@3e@3c@2f@49@46@52@41@4d@45@3e'; document.write(unescape(str.replace(/@/g,'%'))); </script>
 
0
•••
arg, to many characters so here it is continued, i know that all of them there is something wrong with mysql_fetch_array that is the only thing that has a problem.i dont know how to fix this, and i followed the instructions to install it, but in all of them that is the problem, and im guessing i only have to do one thing to fix this, so can some one please help me?
 
0
•••
ok since, nobody is helping, im offering 20NP$ to the person that tells me what is wrong.
 
0
•••
nevermind, will look for help elsewhere.
 
0
•••
Your SQL is not working. When the mysql_fetch_array() function tries to do its thing, the parameter that is supplied (the intended result set) is not valid.

So since there is no result set being returned from the mysql_query() function, you have to look at why the SQL is not working. Possible causes are:

1) The SQL is invalid
2) You are not connected to the database
3) You are connected to the database, but the connection variables are outside the function. You would need to make the connecion string viewable in the function.

-Bob
 
0
•••

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back