i havent tested this:
but try changing
PHP Code:
$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid='$battle[winnerid]'");
to
PHP Code:
$DB_site->query("UPDATE items_user SET bankval=bankval+$battleopt[batwinmon] WHERE userid=$battle[winnerid]");
anything in (')'s is usually translated into strings, and anything out of them are assumed numbers.
i know php will usually auto-cast variable types based on how you are trying to use them, but im not sure if mysql handles it the same. (i know mysql errors when you try to enter a obvious string to a number -> its not auto-cast as a 0) it may take the STRING "5677" (if thats what you set it as...) and turn it into 0, (because it sees the apostrophe and assumes it to be a string) because the string is being added to a number, so the string becomes a null number (0 in this case)
thats what i speculate, because it fits your description of what happens
i hope that made some sense