Forum Moderators: coopster
I have tjecked the DB and there is a value under "orderid" that corresponds to $tt.
The problem is that "payed" is not set =1 but =0 (the default value)
Here is the code:
static public function payed($username,$tt){
$r = Database::query("SELECT * FROM users WHERE orderid = '$tt'");
$data = Database::fetchRow($r);
$password = Utils::getRandomString(8);
$encrypted = Utils::encrypt($data["username"],$password);
Database::query("UPDATE users SET payed=1, password = ? WHERE id = ? ",array($encrypted,$data["id"]));
self::sendWelcomeMail($data["username"],$password,$data["email"], $oid, $tt);
}
Thanks in advance :-)