Hi, I encountered the same problem.
After trying around, I ended up with this "k.i.s.s." solution:
the script displays the (db-generated) list of privileges with checkboxes named priv[id_priv].
there has to be a table priv2user whis will be filled with one record for each priv we assign to the specific user.
the form has two submit buttons: i name them "Ok" (could be: update) and "next" (could be: "done").
the user id is remembered in a hidden input.
at first view, the already chosen privs are marked (checked). now, every time you hit "ok", the script calls itself (<form action=<?=$PHP_SELF ?> method=post>), then deletes all the former privs (delete from priv2user where id_user=$id_user), and in the next step, writes all of the (updated) privs in a loop.
the result is shown instantly. when everything's is done, the admin hits "next".
an alternative I once tried and which worked as well: display the form with the current privs checked, and in addition to that, post the old privs in hidden inputs (of another name, of course, say: oldprivs[$id_priv]). after the admin has hit ok, the arrays are compared:
what is contained in $privs and is missing in $oldprivs has to be inserted.
what is contained in $oldprivs and is missing in $privs has to be deleted.
see array_diff et al. functions for doing that.
but, as wou will agree, the first method is, although somewhat brutal, much more comfortable.
hope this is helpful!