INSERT DATA in few column - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: INSERT DATA in few column (/showthread.php?tid=54980) |
INSERT DATA in few column - El Forum - 10-03-2012 [eluser]giriayoga[/eluser] I want inserting data in few column on 1 tabel...how the code in model and controller??? thanks Model Code: function register($data){ Code: function register(){ Code: <form id="form1" name="form1" method="post" action=""> INSERT DATA in few column - El Forum - 10-04-2012 [eluser]LuckyFella73[/eluser] Please post the code you have so far and describe where you got stuck. Then we can help you to get your code to work. Don't forget to read the User Guide: http://ellislab.com/codeigniter/user-guide/toc.html Especially the sections "controllers", "models" and "Database Class" INSERT DATA in few column - El Forum - 10-04-2012 [eluser]giriayoga[/eluser] yeah...my thread was edited...how this solution...??? INSERT DATA in few column - El Forum - 10-04-2012 [eluser]LuckyFella73[/eluser] Thanks for posting the code now. What happens when you submit the form? Can you describe what doesn't work - do you get an error message? And do you have a reason for using "insert_batch" to insert your form data? Your name attributes look uncommon too (at least I haven't seen it that way). If you need arrays as input field names you usually do this: Code: <input type="text" name="your_name[]" value="" /> Looking at the code you provided there is no need to use arrays here. Correct me if I'm wrong. |