topical media & game development

talk show tell print

professional-sql-09-lib-functions.php / php



  <?php
  function log_page_hit()
  {
      query = sprintf('INSERT INTO \%sSITE_ACCESS (IP_ADDRESS, ' .
          'REQ_PAGE) VALUES ("\%s", "\%s")', DB_TBL_PREFIX,
          _SERVER['REMOTE_ADDR'], 
          mysql_real_escape_string(_SERVER['SCRIPT_NAME'], GLOBALS['DB']));
  
      return mysql_query(query, GLOBALS['DB']);
  }
  ?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.