How to Import Data in MySQL with CodeIgniter 3

CSV files are easier to maintain and can be used for export and import data in the web application.

For data import first, need to allow the users to browse and upload the file. In CodeIgniter, there is upload library available that makes it easier to handle file uploads.

In this tutorial, I show how you can import data of CSV file in the MySQL database table in the CodeIgniter 3 project.

How to Import Data in MySQL with CodeIgniter 3

Read more

Upload Multiple Image files to the Database using PDO – PHP

You can store the image files in the Database table either in base64 format or its path after uploading.

In the base64 method, it is not necessary to store the uploaded file on the server because it is been directly accessed with the base64 encoded value.

In this tutorial, I am using PDO connection for storing multiple image files path in the MySQL database table.

Upload Multiple Image files to the Database using PDO – PHP

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