checkbox/radio button error message PHP
Posted: Tue Jan 28, 2003 5:55 am
have created an add record form (.PHP) that has 3 checkboxes. The checked value = Y, the initial state is unchecked. The form is sent to go to a view page in which all the entered data is viewed.
When I preview the form in a browser and check all 3 boxes and submit the form works perfectly; that is the data is entered correctly into the mysql database and the view page becomes visible.
If I preview the form and leave any of the boxes unchecked I get the following error message:
PHP Notice: Undefined index: endemismo in c:\inetpub\wwwroot\fauna_europaea\TMP826889f9hy.php on line 37
PHP Warning: Cannot modify header information - headers already sent in c:\inetpub\wwwroot\fauna_europaea\TMP826889f9hy.php on line 47
endemismo in this case is the name of the checkbox left unchecked.
It might also be worthy noting that the data is entered correctly into the database despite the error message, that is if the check box is checked the corresponding database field receives a "Y" and is blank if not checked.
Any ideas how to fix the error message?
Many thanks
Jim
When I preview the form in a browser and check all 3 boxes and submit the form works perfectly; that is the data is entered correctly into the mysql database and the view page becomes visible.
If I preview the form and leave any of the boxes unchecked I get the following error message:
PHP Notice: Undefined index: endemismo in c:\inetpub\wwwroot\fauna_europaea\TMP826889f9hy.php on line 37
PHP Warning: Cannot modify header information - headers already sent in c:\inetpub\wwwroot\fauna_europaea\TMP826889f9hy.php on line 47
endemismo in this case is the name of the checkbox left unchecked.
It might also be worthy noting that the data is entered correctly into the database despite the error message, that is if the check box is checked the corresponding database field receives a "Y" and is blank if not checked.
Any ideas how to fix the error message?
Many thanks
Jim