How to add multiple cell id?


Warning: count(): Parameter must be an array or an object that implements Countable in /home/styllloz/public_html/qa-theme/donut-theme/qa-donut-layer.php on line 274
0 like 0 dislike
7 views
For example I have 2 checkbox and using the while bringing value="<?echo $result['id'];?>"
and if I select 2 checkbox in the dB only hold one id
is it possible when saving the output for example through a comma some id for example 1,2
and how they then withdraw using a while loop on another page
<?$query = mysqli_query($link,"SELECT * FROM `tagsrust`");?><?while($result = mysqli_fetch_array($query)){?><?}?>

Thank you for your help =)
by | 7 views

1 Answer

0 like 0 dislike
You can, of course, but it is better to communicate one-to-many or many-to-many. This is performed via linking table which contains two (or another desired number of entries) of the form id_сущности_у_которой_проставлены_чекбоксы, id_чекбокса. And using join to retrieve these records.
by

Related questions

0 like 0 dislike
3 answers
asked Mar 25, 2019 by iamsaint
0 like 0 dislike
1 answer
0 like 0 dislike
1 answer
0 like 0 dislike
3 answers
110,608 questions
257,186 answers
0 comments
35,457 users