Export MySQL data to CSV file in CodeIgniter 3

CSV (Comma Separated Values ) is the most popular file format for data import and export within the project.

In PHP for creating CSV file, you can either use fputcsv() method or directly write the comma-separated content on the file.

In this tutorial, I will show you how you can export MySQL data in CSV file format in your CodeIgniter 3 project.

Export MySQL data to CSV file in CodeIgniter 3

Read more

Make Destination Directory on File upload with PHP

You normally store the user-selected files in a specific directory but the same directory is also used by all other users.

If you are allowing to upload multiple types of files like – images, videos, doc, etc then it becomes a mess.

To avoid this you can create separate directories to store files in an organized way.

But for storing it in a more organized way you can dynamically create directories for each user for storing their files. This makes traversing to file easier.

Make Destination Directory on File upload with PHP

Read more

Dynamic dependent dropdown in CodeIgniter 3 with AJAX

Dynamically dependent dropdown commonly seen in the country, state, and city selection on the webpage. The data on the child element changes according to the value of the parent element.

The process follows the same way if there are more than 2 dropdown elements.

To do this you can either use only PHP or jQuery AJAX.

In this tutorial, I am using jQuery AJAX to make dynamic dependent dropdown in CodeIgniter.

Dynamic dependent dropdown in CodeIgniter 3 with AJAX

Read more