Jump to content

[SOLVED] php counter help


jamesxg1

Recommended Posts

function Count($VAR) { 

        if(mysql_result(mysql_query("SELECT COUNT(1) FROM `counter` WHERE pid = '$VAR' AND ip = '".$_SERVER['REMOTE_ADDR']."';"), 0, 0 ) > 0) {

             if(mysql_query("UPDATE `counter` SET number=number+1 WHERE pid = '$VAR' AND ip = '".$_SERVER['REMOTE_ADDR']."';")) { 
            } 

        }else{ 

            if(mysql_query("INSERT INTO `counter` SET number=1, pid = '$VAR', ip='".$_SERVER['REMOTE_ADDR']."';")) {                 
            } 
        } 
}

 

 

i get this error

 

Fatal error: Cannot redeclare count() in C:\xampp\htdocs\social\Utilitys\Functions.php on line 15

 

help ???

Link to comment
https://forums.phpfreaks.com/topic/159953-solved-php-counter-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.