Save List Box Values in Many Tables - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Save List Box Values in Many Tables (/showthread.php?tid=33492) |
Save List Box Values in Many Tables - El Forum - 08-27-2010 [eluser]shahmy[/eluser] Hi, I have 2 list boxes in my view. I am moving selected list box values from left to right, I want to know, "how to save the right list box values in table ?". If any one know, Please help me. Thank You. Save List Box Values in Many Tables - El Forum - 08-28-2010 [eluser]Derdiusz[/eluser] Name your list box "as array" like: Code: <select name="right_side[]" multiple> Code: foreach($_POST['right_side'] as $v) Of course this is a sample code. right_value from insert query is a field in your database table. Greetings D. Save List Box Values in Many Tables - El Forum - 08-29-2010 [eluser]shahmy[/eluser] Hi Derdiusz, I was try what u post above. But the values not inserted in tables, i will copy my codes bellow, that is when i post the form the null values return to the model. If u know please help me. "My view" Code: <?php echo form_open_multipart('teachers/videomatrials/insertmatrials',$frmname);?> "My Model" Code: foreach($_POST['destination_stu'] as $stu_id) Thank You. |