CREATE DATABASE pos_db; Next to creating tables. [eluser]Aken[/eluser] While most of these situations work, if you want to do it to EVERY form dropdown, that's a lot of additional code. Open the database.php file in the "application/config" folder and find the following code: In this step, you will learn the basics of select options dependent using Codeigniter and Ajax. The right way is to using array of associative arrays and insert them using insert_batch Active Record function. You should use Codeigniter Form Helper to do that : Asking for help, clarification, or responding to other answers. I am storing theme names in the database like so: I am then calling all themes in the Model and returning the array with this code: I am using my Constructor to grab the data and Render it to my settings view like so: (I am sending a few things at the same time in $this->data that's why it is in an array but I cut that code out). To insert a select option value in the database, you must connect PHP to MySQL database with the help of the following query. After create a table in the MySQL database you need to insert record or data on it.If you want to know how to insert data in CodeIgniter framework please visit the link : Insert data in CodeIgniter. Select Dropdown with Options. To create a "category" table can be done by executing the following query: To create a "sub_category" table can be done by executing the following query: To create a "product" table can be done by executing the following query: Next, insert some data into the "category" and "sub_category" tables. 5. PHP 3 was released in 1998. I have fixed it now and it was because of how I was closing one small '>' inside the echo !!! ), Strange fan/light switch wiring - what in the world am I looking at. LEARNINGPROGRAMMING.NET, ALL RIGHTS RESERVED. To get value of a selected option from select tag: The looseness of the original code is just looking for an SQL injection attack. I'm a Software Engineer. 2. I am storing theme names in the database like so: I am then calling all themes in the Model and returning the array with this code: Fetch data from database using php start php script inside tbody tag in our bootstrap row. Wall shelves, hooks, other wall-mounted things, without drilling? How to Load data using jQuery AJAX in Select2 using CodeIgniter 4, we will see in a clear way here. I have one more major thing I'm stuck on but I feel bad to keep asking you :$, Thanks so much for your reply and help. student_city because in database row name is student_city so we can echo its through $student->student_city. I haven't found anything near to this both in quality and simplicity. Keep things DRY - don't repeat yourself. SELECT selected CHECKBOX and update in selected row into DATABASE in Codeigniter: jaydevvara Junior Member; Posts: 38 Threads: 14 . How were Acorn Archimedes used outside education? How do I style a