i think made some error in the above posts
... feeble can u help me see if the code below is correct? i cant get it to work anymore...took the whole day to troubleshoot but cant seem to find out why this code is not updating anymore....
// Invite MOD; looks like registration went ok, let's mark the invite key as used and who it was used by.
if ($context['invite_key'] !== false)
{
db_query("
UPDATE {$db_prefix}invites
SET ID_REGISTRATION = '$memberID'
WHERE inviteKey = '{$context['invite_key']}'
LIMIT 1", __FILE__, __LINE__);
}
elseif (!empty($_REQUEST['inviter']) && (int)$_REQUEST['inviter'] !== 0)
{
db_query("
INSERT INTO {$db_prefix}invites (ID_MEMBER, ID_REGISTRATION, inviteTime)
VALUES ('" . (int)$_REQUEST['inviter'] . "', '$memberID', " . time() . ")
", __FILE__, __LINE__);
if ($getID)
{
$ID = $getID['ID_MEMBER'];
$addMoney = 100;
db_query("
UPDATE {$db_prefix}members
SET money = money + '$addMoney'
WHERE ID_MEMBER = '$ID'
LIMIT 1", __FILE__, __LINE__);
}
}