This is probably the simplest thing but I'm not catching it, basically im increasing a variable that got its value from a database by 1 (so var++) but then I check it and it had been increased by 2. heres the code:
After its run, if i go into the database to and view the value of hitcount its 1 more than it should be...Code:$res = mysql_query($query); //retrieve hitcount from the returned array $data = mysql_fetch_assoc($res); $count = $data['hitcount']; //$count++; mysql_free_result($res); //enter the new value of hitcount to the database $query = "UPDATE hitcount SET hitcount='".$count."'"; mysql_query($query);




Reply With Quote