Hello please help
Total php beginner please help i am going crazy
my home-page opens finishes loading but with error's on page and my hitcounter does not display on my site but it's still logging my site
I looked through my site files and found this error below.
Is this the problem i hope please help me everything is so complex for me to understand alone: thanks so much
$sql="select * from links_location where location='l'";
$rs=mysql_query($sql) or die("error in common.inc.php at line 257");
while($rec=mysql_fetch_array($rs))
This is my hitcounter stat.php file
<?
include("include/common.inc.php");
global $Call;
switch($Call)
{
case"":
start_stats();
break;
case"show_pages":
show_pages();
break;
}
function start_stats()
{
global $load_url,$title,$current_sid,$REMOTE_ADDR,$ip_address,$resolution,$color_depth,$browser,$platform,$countryName,$visited_from,$member_id,$hit_counter,$done,$url;
$sqls="select counter from counter where member_id=$member_id";
$rss=mysql_query($sqls) or die("error");
if(mysql_numrows($rss)>0)
{
$recs=mysql_fetch_array($rss);
$hit_counter=$recs[0]+1;
}
else
{
$hit_counter=0;
}
if(empty($current_sid))
{
$sql="select * from counter where member_id=$member_id";
$rs=mysql_query($sql) or die("Unable to check the existence of member");
if(mysql_numrows($rs)>0)
{
$sql="Update counter set counter=counter+1 where member_id=$member_id";
mysql_query($sql) or die("Unable to update counter.");
}
else
{
$sql="insert into counter values($member_id,1)";
mysql_query($sql) or die("Unable to update counter.");
}
$ip_address=$REMOTE_ADDR;
$ip_address=$REMOTE_ADDR;
get_country();
$last_login=getmysqldate(getukdate(date("Y-m-j")));
$time=date("G:i:s");
$last_login=$last_login." ".$time;
$sql="insert into visitor_stats values('',$member_id,\"$ip_address\",\"$last_login\",\"$resolution\",\"$color_depth\",\"$browser\",\"$platform\",\"$visited_from\")";
mysql_query($sql) or die("Unable to make log of login .");
}
if(empty($current_sid))
{
$current_sid=session.session_id();
session_register("current_sid");
}
?>
<?
if(empty($done))
{
$done="no";
?>
<?
}
}
function show_pages()
{
global $HTTP_POST_VARS,$done,$url;
?>
<?
}