Re: Point/Cash Exchange
Not exactly certain but if your trying to give a user Points is this called under crystals in the database?
$db->query("UPDATE users SET crystals=crystals+$iqgain,money=money-{$_POST['money']} WHERE userid=$userid");
print "You traded {$_POST['crystals']} Credits for \$".number_format($iqgain).".";
Because or that would need to be edited.
to something lke
$_POST['money'] = abs(@intval($_POST['money']));
$sql = sprintf("UPDATE users SET points=points+%s,money=money-{%s} WHERE userid=%s, $iqgain, $_POST['money'], $userid);
$db->query($sql);
print "You traded {$_POST['crystals']} Credits for \$".number_format($iqgain).".";
Im not entirely sure tho (BTW i added security to the second one ;))
Can you explain what the problem is more?