All pastes #427277 Raw Edit

Miscellany

public php v1 · immutable
·published 2007-04-06 18:32 UTC
rendered paste body
<?phpinclude ("config.php");include("include/nationfunctions.php");$id = $online['id']; //sets $id to current logged in user's id$nationArray = array();$nationArray = query_nation($id); //run function for that user id$tempVar = $nationArray['pop'] * $nationArray['income'] * $nationArray['taxes']; //calculation of taxes per nation$tempVar = $nationArray['money'] + $tempVar; // add money to taxes we just collected mysql_query('UPDATE users SET money ='.$tempVar.' WHERE id= '.$id); //save it?>