Well, that could be anything really.... but my guess is you need the mySQL extension installed/enabled in your php.ini.
You should do a quick info script to spit out the vital information about what's loaded and where it's loaded from:
<?php phpinfo(); ?>
If you search the page for "mysql" you should get a section header (bold and large text). If you don't, then you need to install/enable the mySQL extension with php.
If you get that header, then I'd wonder about the database and connection and query. Typically it's "bad form" to put both a query call and the fecthing in one call. This raises the chances of unseen errors not being caught. You should really add in some error handling:
$result = mysql_query("SELECT * FROM `user_info` WHERE `username`='$username'") or die(MySQLError());
if($result)
$user = mysql_fetch_object($result) or die(MySQLError());
if(is_object($user))
$newaddm = round($user->money + $price);
else
trigger_error('User is not an object', E_USER_ERROR);
$result = mysql_query("UPDATE `user_info` SET `money`='$newaddm' WHERE `username`='$username'");
if(mysql_affected_rows() < 1)
die(MySQLError());
else
echo 'Updated successfully!';
function MySQLError()
{
echo '
<!--
MySQL Error Number: ' . mysql_errno() . '
MySQL Error Info : ' . mysql_error() . '
-->';
}
I prefer to hide mySQL stuff in HTML comments, but you could just as easily print it on the screen in front of you.