Hello everyone, im currently working on a Banking System for the Activity Points system. I have the event listener and the actual form already.
The only problem im having trouble with is that whenever I try to submit the form, no points are put into the field "banked" in the wcf1_user table.
Anyone have any idea on how I can make a working event listener and submission for such a script.
Im thinking something like this:
PHP
$oldactivityPoints = $activityPoints-$banked;
$newactivityPoints = $activityPoints+$banked;
/**
* Deposit the Rupees
*/
public function update($username, $banked = TIME_NOW) {
$sql = "UPDATE wcf".WCF_N."_user SET banked = '".escapeString($banked)."',
WHERE userID = ".$this->userID;
WCF::getDB()->sendQuery($sql);
}
Display More
This is from an old script I had, how can I convert this into the new coding that WBB3 uses?
PHP
$db_connect->query("UPDATE db_users SET usermoney='$newmoney' WHERE userid = '$user_id'");
$db_connect->query("UPDATE db_users SET userbankmoney='$newbank' WHERE userid = '$user_id'");
$db_connect->query("UPDATE db_users SET bankinserttime='$time' WHERE userid = '$user_id'");
Thank you for your time!