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! Quote 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! Quote 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? Quote Link to comment https://forums.phpfreaks.com/topic/75172-counting-problem/#findComment-380933 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.