Code comments are required.
isset() cannot be used this way.
$msg_status doesn't seem to be defined prior to this line anyway.  Was this code tested?
Use synthetic controls for hidden values.
Properly handle the reassignment of posts from deleted users.