Import an Excel file in MySql Database using php

welcome back to shortlearner.com, In this tutorial, we will see how to Import an Excel file in Mysql database. In the First step we will create a Database to insert an excel data into Mysql table, a form to make a view to uplo ad an Excel Sheet and also create a PHP

Advertisement
script to perform operation to insert data into Database.

Create Database

To Insert excel sheet data into MySql database, we need to create a database named as ‘test_excel’ and also create a table named as ‘excel_sheet’

Also Read :
How to Install PHP on CentOS.
How to integrate Razorpay Payment Gateway using PHP.

PHP Login Script With Remember me.
Change password using javascript, php and mysqli.
Password and Confirm Password Validation Using JavaScript
Check Email is Already Registered in Database using Ajax and JavaScript.
How to hide extension of html and php file.?

Config.php

after creating database , we move on the config.php page.. here we make a database connection.

Index.php

after creating database , we move on the index page.. in the index page we take a csv file from our computer and redirect it to functions.php page . where we check that the file which is selected is CSV  or not.

functions.php

In this page we catch the file and check it , if our file is  csv than it import into database otherwise it shows the error and redirect to index.php page.

Keep Learning..

Tags: No tags

Add a Comment

Your email address will not be published. Required fields are marked *