Someone help me... I have problem with sending data to my mysql table

$conn = mysql_connect(“XXX”, “XXX”, “XXX”);

if ($_POST[‘score’]) {
$score = $_POST[‘score’];
print “status=Finished”;

$sql = “select * from XXX where user_name = ‘XXX’”;
$sql_res = mysql_query($sql,$conn) or die(mysql_error());
srand ((float) microtime() * 10000000);
while ($stats = mysql_fetch_array($sql_res)) {
$gold = $stats[‘cash’];


$gold = $gold + $score;

$q = “update usergame set cash = ‘$gold’ where user_name = ‘$HTTP_SESSION_VARS[user_name]’”;


$gold outputs as 0
$score which is the score from the flash game works!
cash is updated to the same as score… because $gold doesn’t register!
help i donno why this does htis