The checkbox will be successful only if it is set.
Failed controls are not passed as data.
Therefore, you can find out if the checkbox is checked by seeing if its value has been transmitted.
for instance
if ($_POST['chk']['newmsg2'] == 1) {
source share