I got this form:
<form name="formx" id="formx" action="var.php" method="POST">
<input type="checkbox" name="f_check1"> Check 1
<input type="checkbox" name="f_check2">Check 2
<input name="f_register" value="Register" type="submit">
</form>
And on the var.php file I have:
<?php
if($_POST['f_register'] == "Register") {
$check1 = $_POST['f_check1'];
$check2 = $_POST['f_check2'];
}
echo $check1. "<br>" ;
echo $check2;
?>
And when i fill the form and go to the var.php, i only get results if the checkbox is on, and i want it to say "true" if checked and "false" if not.
P.S: I'm using XAMPP to run the website.