How to get all the values of all the checked checkboxes and then submit it into form, all the values should be combined into one string and seperated with comma, how can I make it happen? basically, I got a a database which pulls out categories and then places it into plenty of checkboxes , and then in the admin panel you choose which categories you want certain thing. and then ofcourse it inserts it into the database.., I just can't figure out how to make it...
$query = "SELECT * FROM categories";
$query_run = mysql_query($query);
while($row = mysql_fetch_assoc($query_run)) { ?>
<input type="checkbox" value="<?=$row['name'];?>" name="<?=$row['name'];?>">
<? } ?>
Aucun commentaire:
Enregistrer un commentaire