problem with HTML checkbox variable in PHP, please help
Posted: Tue Jan 13, 2004 12:23 am
Hi,
I'm having troubles with the following variable from an HTML form :
<input type="checkbox" value="1" name="changecheck">
there is only 1 checkbox in the HTML form, the value of "changeckeck" is either "1" if checked or nothing if not checked.
Here is the php code :
$changecheck=$HTTP_POST_VARS['changecheck'];
if ($changecheck !== "1")
This works fine if the checkbox is checked, but if it is not, there is an error message :
Notice: Undefined index: changecheck in c:\program files\easyphp1-7\www\microsent\pages\pass_answer.php on line 16
(Line 16 is : if ($changecheck !== "1")).
Who can help ?
I'm having troubles with the following variable from an HTML form :
<input type="checkbox" value="1" name="changecheck">
there is only 1 checkbox in the HTML form, the value of "changeckeck" is either "1" if checked or nothing if not checked.
Here is the php code :
$changecheck=$HTTP_POST_VARS['changecheck'];
if ($changecheck !== "1")
This works fine if the checkbox is checked, but if it is not, there is an error message :
Notice: Undefined index: changecheck in c:\program files\easyphp1-7\www\microsent\pages\pass_answer.php on line 16
(Line 16 is : if ($changecheck !== "1")).
Who can help ?