I have a input in a form
<form name="frmAdd" method="POST" action="/index.php?a=save">
Status : <input type="checkbox" id="status" name="chkActive" value="" ><label for="status">Active</label>
</form>
but when I am calling the value of it, via $_POST[‘chkActive’], it’s giving same value on that page. Whether I have checked the value or not.
Please tell me how can I know that this checkbox is checked or not (in PHP).
If you are using just a single checkbox you can do this :
within PHP
but you need to ensure there is a value set within the HTML