0
I have a problem that when the checkbox is empty, the message is displayed
Undefined index
I’ve seen some solutions on the Internet, so far in the same forum, but nothing has solved the problem.
Follow the Cód. below:
<!-- Cód. html -->
<input type="checkbox" name="cb">
//Cód. php
<?php
$check_B = $_POST['cb'];
if(isset($check_B)){
echo "Checkbox selecionado.";
} else { echo "Checkbox não selecionado.";
?>
Thank you!
Thank you Erlon! It worked right.
– Tomines R.