[Function] Change_rank()

This forum is now closed as part of retiring phpBB2.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

This forum is now closed due to phpBB2.0 being retired.
Post Reply
I've Been Banned!
Posts: 630
Joined: Tue Nov 30, 2004 10:35 am

[Function] Change_rank()

Post by afterlife_69 » Fri Jul 15, 2005 1:11 pm

About: Lets you change the rank of any user

Code: Select all

function change_rank($rank, &$user_id)
   global $db, $sql;
   $sql = "UPDATE ". USERS_TABLE ." SET user_rank = '" . $rank . "' WHERE user_id = '" . $user_id . "'";
      if( !$result = $db->sql_query($sql) )
         message_die(GENERAL_ERROR, "Couldn't update user rank", "Database Error", __LINE__, __FILE__, $sql);

Code: Select all

change_rank('1', $userdata['user_id']);

Registered User
Posts: 21
Joined: Tue Dec 13, 2005 8:29 pm

Post by davidv1992 » Wed Apr 12, 2006 8:11 pm

perhaps you should check wether that rank does exists, i don't now what happens in phpbb when someone has an non-existing rank.

Post Reply

Return to “[2.0.x] MOD Writers Discussion”