Code: Select all
<?php
$playerinfo ="select * from players where name = '$player'";
$playerinfo2=mysql_query($playerinfo) or die("could not get player stats!");
$playerinfo3=mysql_fetch_array($playerinfo2);
$pattackers = $playerinfo3['attack'];
$pdefnders = $playerinfo3['defence'];
$plevel = $playerinfo3['level'];
$pland = $playerinfo3['land'];
$playersr = $playerinfo3['successrate'];
$newsr = $playerinfo3['attack'] * 10 + $playerinfo3['land'] * 3 + $playerinfo3['level'] * 2 + $playerinfo3['defence'] * 10;
 $updateplayer="update players set successrate = '$newsr'";
	   mysql_query($updateplayer) or die ("could not update player");
	   ?>successrate stand for a ranking system the rest you should be familler with,
now my question is how do i update every player,but for there own successrate, and not all get the same result defends on who's session is on...


 
 