PROBLEMZZ!!!

0 Sid wadhwa · September 21, 2015
<?php
 require 'counter.inc.php';
 $user_ip = $_SERVER['REMOTE_ADDR'];
 
 function ip_exits ($ip){
  global $user_ip;
 
 }
 
 
 function update_count(){
  $query = "SELECT `count` FROM `hits_count`";
  if($query_run = mysql_query($query)){
   $count = mysql_result($query_run, 1 , 'count');
   echo $count;
  }
  
 }
 
 update_count();
?>





IN DATABASE : :
1 row and 1 field (field name=`count`)
value of count row 1 is '0'



//FOR MORE INFORMATION IT'S TUTORIAL NUMBER 124 - CREATING DATABASE HIT-COUNTER PART-2

Post a Reply

Replies

- page 2
Oldest  Newest  Rating
0 Casper Hollemans · September 22, 2015
could you also post the error what your getting?
0 Sid wadhwa · September 22, 2015
why this code is depreciated ? any substitute of it ? n update series doesn't contain this !
0 Ian Arbuckle · September 21, 2015
I assume you are watching Alex's tutorials and the code at that time is depreciated. I suggest checking out the updated series linked below.

https://www.youtube.com/watch?v=BEbKji_pSZM&list=PLfdtiltiRHWEbLm0ErHe7HgEOVIO26R_o
  • 1
  • 2

PHP

107,260 followers
About

Server-side, HTML embedded scripting language used to create dynamic Web pages.

Links
Moderators