1) Sanatize your data before sending it to the DB
2) You do not need two forms, using radio buttons (or a drop down) they can change their option, which would mean you could then preset what they are currently set to when you load the form in the first place.
3) Dont know how much trouble shooting you have done, but when a variable is failing to be passed into the DB query you must ask yourself why not. Putting an echo like
echo "Var online = ".$online;
would immediately tell you if the variable is blank and if it isnt then you have an SQL problem.
Try changing your query to
$sql = "UPDATE oc_t_user