Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

simple hit counter problems

Status
Not open for further replies.

SLMHC

MIS
Jul 23, 2004
274
CA
ive been trying to get this script for work for a few days now.

<?php

include 'dbinfo.php';
include 'dbconnect.php';

//get count
$query = "SELECT * FROM counter";
$display=mysql_query($query);

$hits = $display;

if (!session_is_registered("counted"))
{
mysql_query("UPDATE counter SET hits = hits +1");
session_register("counted");
}

mysql_close();
}

It will not update the counter...help!

-Dave
 
bahh! bad syntax i replaced the last } with ?> and all is good.

-Dave
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top