No, but I could throw one together in 10 minutes.

Here is some 5 minute untested code to get you started
where int count is in table counter.

<?php
$dblink = mysql_pconnect("localhost","username","password");
mysql_select_db("DB");
?>

<!-- HTML PAGE -->

<?php
  $query = "Select count from counter";
  if( !($dbq = mysql_query($query,$dblink)))
  {
    echo "Error reading database.  Please Contact <A
HREF=\"mailto:[EMAIL PROTECTED]\";>Administrator</A>";
    exit;
  }

$count = mysql_result($dbq,0)
echo "This page has been visited $count times!";

  $query = "Update counter set count = count + 1";
  if( !($dbq = mysql_query($query,$dblink)))
  {
    echo "Error updating database.  Please Contact <A
HREF=\"mailto:[EMAIL PROTECTED]\";>Administrator</A>";
    exit;
  }
?>

Sheridan Saint-Michel
Website Administrator
FoxJet, an ITW Company
www.foxjet.com


----- Original Message -----
From: "Gert Mellak" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, August 22, 2001 10:49 AM
Subject: [PHP] php-counter


> hi!
>
> do you know an easy-to-use-php-counter, which uses mysql to store the
data?
>
> gert
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to