Send only selected data .. many-to-many relationship table. - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Send only selected data .. many-to-many relationship table. (/showthread.php?tid=70373) |
Send only selected data .. many-to-many relationship table. - kirasiris - 04-01-2018 So, I want to create a many-to-many relationship table in my database for which I decided to create a function which is supposed to let me send data with not problem. PHP Code: // Create many-to-many relationship So far it works great, the problem comes when selecting specific data (sometimes I just get to choose 1, sometimes 2,etc.). The current function actually send all the values without taking into account that I just selected 1(maybe?). Here are some pictures to clarify what I mean: Second Pic: third pic: then in the post appear all three(or more depending on the number of categories that I have created). I hope I could make myself clear. Thanks in advance. RE: Send only selected data .. many-to-many relationship table. - jreklund - 04-01-2018 Make a var_dump on categories and see what you are actually sending to your controller. If it's more then one (if only one selected) it's a javascript problem. |