<form action="our_file.php" method="post">
<input type="checkbox" id="checkbox" onclick="check_value()" />
<input type="hidden" name="VALUE" />
</form>
<script>
function check_value(){
var checkbox = document.getElementById('checkbox'), input = document.getElementById('VALUE');
(checkbox.checked == true)?(input.value = '1'):(input.value = '2')
}
</script>
В php файле $_POST['VALUE'];