Im working on a little script that edits a supervisor conneted to a department.
$a_ansvarlig is the Department
$n_ansvarlig is the Supervisor
What i mean is that:
if Larry is attached to Finance and his $visibility is 1
then when im editing Bob [previously attaced to CustomerService] and setting the value $a_ansvarlig to Finace then i should get an error saying:
$feilmelding .= 'A user is already connected to ' . $a_ansvarlig . '<br>';
$feilmelding .= 'Set users visibility to OFF in order to continue<br>';
$visibility has two values: 1 for ON and 0 for OFF
The problem is that the script is not working.
Can someone please have a look at it and tell me what is wrong?