html check box gives errors
Posted: Tue Oct 10, 2006 8:00 pm
Hi All
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
my php
ok here if it is checked that it works. but if it is not checked it returns
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
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