I have a html form with a check box the file is called form.php. The value of the check box when checked is set to true. the form is submited to handler.php. There I need to know if the check box was checked or not.
html form
Code: Select all
<form name="form1" method="post" action="tempPros.php">
<input name="checkbox" type="checkbox" id="checkbox" value="true">
</form>Code: Select all
echo $_POST['checkbox']Notice: Undefined index: checkbox in c:\Inetpub\wwwroot\handler.php on line 16
I am lost please help how do I get my code to not break with the check box not checked?
thanx dave