i have a prob with my checkbox
<form action="<?php echo $editFormAction; ?>" name="form2" id="form2" method="POST">
<?php if ($totalRows_subjek > 0) { // Show if recordset not empty ?>
<table width="69%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center">List Of Subject </div></td>
</tr>
<tr>
<td><div align="center"></div></td>
</tr>
<?php do { ?>
<tr>
<td height="16"><div align="center">
<input name="subject_code" type="checkbox" value="<?php echo $row_subject['CODE']; ?>" checked="checked" />
<?php echo $row_subject['SUBJECT_NAME']; ?></div></td>
</tr>
<?php } while ($row_subject = mysql_fetch_assoc($subject)); ?>
<tr>
<td><div align="center">
<input name="class" type="hidden" id="class" value="<?php echo
$row_class['CLASS_NAME']; ?>" />
<input name="Submit" type="submit" id="Submit" value="Submit" />
</div></td>
</tr>
<tr>
<td height="16"><div align="center"></div></td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form2">
</form>
i want insert all list when user checked
but this coding only insert the last data was checked
This is the example in the table when data is inserted:
Number | | |
(primary key) | Class | subject |
1 | A | List 1
2 | A | List 2
3 | A | List 3
i submit the value from checkbox as a 'text'
Please Help me....