i have problems handling with checkboxes when i try to insert a record.It returns no value.
For example, if the student is enrolled to a course, i check the box and i want to store the value 1 and if the student is'nt enrolled, i leave the box empty.
Well, i placed, if ($stdenrol=="") $stdenrol=0;
before my insert st.
<INPUT type=checkbox name="std_enrol" value="1"<? if ($stdenrol==1)echo "checked";?>>
So, I think if the checkbox is checked, it returns a value "1" to the table and if it is not checked, it returns a value "0".
If i check it and try to insert, it does'nt produce me any error.If i leave it empty, it produces me an error,"conversion error from string."
How can i fix this error.
Ps:This column can also accept null values.
Thanks in advance