codice:
<?php
if (isset($_POST["chk"])) {
    $chk = $_POST["chk"];
} else {
    $chk = 0;
}
?>