query(" SELECT BitcoinAddress FROM users_info WHERE UserID = '$UserID'"); list($Addr) = $DB->next_record(); if (!empty($Addr)) { return $Addr; } elseif ($GenAddress) { if (empty($NewAddr)) { error(0); } $DB->query(" UPDATE users_info SET BitcoinAddress = '".db_string($NewAddr)."' WHERE UserID = '$UserID' AND BitcoinAddress IS NULL"); return $NewAddr; } else { return false; } } ?>