xsubs Posted October 29, 2007 Share Posted October 29, 2007 I'm trying to add 1 to a counter everytime that the page is loaded. This is my function code: function FileWrite($sign, $act, $id) { include("./Configs/Config.php"); $action = array('Plus' => '+','Minus' => '-'); if (!mysql_query("UPDATE Text SET $act = $act{$action[$sign]}1 WHERE id = '$id'")) { return false; } if (!mysql_query("UPDATE Total SET $act = $act{$action[$sign]}1")) { return false; } return true; } It is counting well, but sometimes it just going crazy. like here: What can i do to solve it? It's very urgent. Ty! Link to comment https://forums.phpfreaks.com/topic/75172-counting-problem/ Share on other sites More sharing options...
xsubs Posted October 29, 2007 Author Share Posted October 29, 2007 Someone! please! It's urgent as hell! Link to comment https://forums.phpfreaks.com/topic/75172-counting-problem/#findComment-380547 Share on other sites More sharing options...
xsubs Posted October 30, 2007 Author Share Posted October 30, 2007 Someone, please? Link to comment https://forums.phpfreaks.com/topic/75172-counting-problem/#findComment-380933 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.