vendredi 11 décembre 2020

How to insert specific clicked checkboxes, if else statement

I'm having problem with inserting data if is clicked some value, i'm getting value from checkboxes but i want to insert some data with that values, i'm only inserting all data or just one, but i want to insert if is clicked '0' , '3' insert only inputs for them

This is my view, like u see in the botom you need to check what values('vrednost') you want to insert, if i click 0 and 3 i want only that 2 to insert in data (https://i.stack.imgur.com/n68g9.png)

In this example i check only 0, 5 and this is inserting all https://i.stack.imgur.com/GAlrE.png

This is my controller, i need some if statement if to insert if clicked 1 or clicked all, or 3.
I tried to write a huge if else i got that values but its not accurate https://i.stack.imgur.com/yNQrE.png

PS. if value from checkbox('vrednost') he is making a one array with value of that checked checkbox



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire