This script is a part of the mod cp, mods are level 4. This script allows to change the level of members.
I want to restrict level 4 members i.e mods to only be able to change level of members below level 4.
This is the script, but it allows to edit the level of members above level 4 also.
[php]
function update_user($POST, $change) {
if(isset($change)) {
$username = $POST['username'];
$level = $POST['level'];
$this->query("UPDATE ".DBTBLE." SET user_level = '$level' WHERE username = '$username'");
return $username." .User level was changed to ".$level;
}
}
[/php]
How can Restrict the $POST['username']
to only display username below level 4?