The below is a snippet
<tr>
<td>7</td>
<td>Tick the Teaching Methods Used </td>
<td>
<input type="checkbox" id="lectures" name="lectures" value="lectures">Lectures
<input type="checkbox" id="study" name="study" value="study">Case Study
<input type="checkbox" id="audvid" name="audvid" value="audvid">Audio|Video
<input type="checkbox" id="interactive" name="interactive" value="interactive">Interactive Methods
<input type="checkbox" id="discussion" name="discussion" value="discussion">Discussion
<input type="checkbox" id="role" name="role" value="role">Role Play
<input type="checkbox" id="quiz" name="quiz" value="quiz">Quiz
</td>
</tr>
and the validation code is
if ((document.form1.lectures.checked == false)
&& (document.form1.study.checked == false)
&& (document.form1.audvid.checked == false)
&& (document.form1.interactive.checked == false)
&& (document.form1.discussion.checked == false)
&& (document.form1.role.checked == false)
&& (document.form1.quiz.checked == false)) {
alert("Please check any one method");
isValid = false;
}
return isValid;
How do i insert only the checked values into mysql database, implode doesn't seem to help
Edit : If i use the same "name" for all checkbox implode works but in that case I'm not able to validate