This is a general web question, not php. The problem you have is client side and the php doesn't kick in until the form is submitted.
If I click on the icon will the form get submitted? if so have a tiny form
<form action="dothis.php">
<input type=hidden name=status value=<?=$status?><input type=submit></form>
that way when people click on the button the only item which gets submitted is the status of the employee. If they were IN then change the value to OUT.
If you don't want to submit the form but just change a value consider radio buttons - they're abit more user friendly.
sarah