Add hidden input fields to each line <td>. For instance:
echo "<td>".$rows['book_id2']."</td><input type='hidden' name ='book_id2' value='".$rows['book_id2']."' />";
I tried writing JavaScript, but it is much easier in jQuery. Add these scripts to the end of the closing tag </body>.
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script>
var toggleInput = function(){
$('input[type=hidden]').prop('disabled', true);
var selection = $('input:checked').eq(0);
selection.parent().parent().find('input[type=hidden]').each(function(){
$(this).prop('disabled',false);
});
}
$(form).on('submit',toggleInput);
</script>
JQuery DOM, . , JavaScript. , - JavaScript, !
. , .
, , . JavaScript JQuery - .