Generic PHP script to upload data to mysql

I am looking for a generic php script that will let me select a csv file (see sample below) and insert the data in the file in to a mysql database. Details of the the upload should be displayed on the screen. In case of errors, the exact error and line number should also be mentioned. The following features are required.

1) The database name, server ip, username and password would be configured in the script.

2) The table name would be the first row of the csv file.

3) The column names would be the second row of the csv file.

4) The delimiter used in the CSV would be comma (,) but it should be configurable at the top of the script in case I need to change it. All data elements would be enclosed in double quotes ("). Commas in between two double quotes should be ignored.

5) MySQLi should be used.

6) mysqli_real_escape_string() Function should be used to escape any special character.

7) After completing the execution of the script, the number of records inserted should be displayed.

8) In case of error, the entire file should be rolled back using mysql transactions. The line number and error details of the first encountered error should be displayed.

9) Basic validation of the csv file should be done. The following errors should be captured.

-a The database and table name should be a valid one.

-b Column names in the file should be found in the table.

-c Right number of data elements based on the first row

-d Proper enclosure of data in double quotes.

-e NULL values being inserted into NON-NULL columns.

-f proper handling of string and numeric values.

10) The script should be able to handle up to 10,000 rows.









Skills: MySQL, PHP

See more: script php import access data mysql, upload data mysql database upload file php scriptonline website, php script upload xml product data feed, php script upload import xls file mysql, php script upload data csv ke mysql, php script upload data form sql server, software write mq4, software write chip epson, useful software write book, software write web specs, oscommerce php script import data mysql, free php script upload xml file mysql database, free software write user guide, php upload data mysql image images, software write edid, free software write company profile, generic php script show database data, software write websites idea, software write book images, software write books

About the Employer:
( 13 reviews ) Newark, United Arab Emirates

Project ID: #14025045

Awarded to:


Hi! I already have working parts so I'll do it quickly and qualitatively. I'm ready to start working on your project right now.

$55 USD in 1 day
(28 Reviews)

34 freelancers are bidding on average $153 for this job


Hello, Thanks for giving me the opportunity to discuss your project. I am a professional PHP developer with an experience of more than 8 years in creating and customizing PHP based websites, themes and plugins/mo More

$250 USD in 5 days
(180 Reviews)

Hi, I am Anna with more than 5 years experience in PHP, Laravel framework, Slim, CodeIgniter, MySQL, PostgreSQL, HTML, CSS, Javascript, jQuery, Vuejs, Ajax, WordPress template & plugin, WooCommerce. I am able to More

$250 USD in 7 days
(120 Reviews)

Hello, I have gone through the post and yes; I will help you for sure to build generic php script that will let me select a csv file and insert the data in the file in to a mysql database [login to view URL], [login to view URL] More

$200 USD in 4 days
(91 Reviews)

Hello. I'm professional web developer since 2006. My specifications: eCommerce and custom scripts. I have experience in such areas: PHP, MySQL, HTML5, CSS3, JavaScript, Bootstrap, jQuery, XML, csv. I can develop th More

$140 USD in 2 days
(91 Reviews)

Greetings sir, how are you today sir? hope fine. Sir, I have read your project details and i will create php script that will allow you to upload your csv file with data validation and report (on success and err More

$100 USD in 1 day
(119 Reviews)

HELLO THERE, Over 200+ Positive Reviews. Over 90% Completion Rate. 5 Star Rating. 10+ Years of experience in PHP/MYSQL I AM INTERESTED IN WORKING ON THIS PROJECT. PLEASE CHECK MY REVIEWS AND THEN DECIDE O More

$120 USD in 3 days
(275 Reviews)

I am experienced in PHP, MySQL, Javascript, Opencart, CodeIgniter, Cakephp, yii and WordPress. [login to view URL] [login to view URL] [login to view URL] [login to view URL] [login to view URL] More

$166 USD in 3 days
(207 Reviews)

I can get this done for you pretty quickly, in just a couple days time, just let me know when you are ready to start.

$138 USD in 3 days
(154 Reviews)
$250 USD in 7 days
(89 Reviews)
$155 USD in 1 day
(158 Reviews)

Hi! I can help you with this project. Had a similar experience about uploading CSV and importing to MySQL. Do you need any special UI? Ready to discuss in chat

$250 USD in 1 day
(17 Reviews)
$35 USD in 3 days
(43 Reviews)

Dear Client, I read your job description carefully. I have developed website to import CSV to MySQL using PHP and Bootstrap. I can make your website in a day. Also I can start my working now. I will deliver hig More

$100 USD in 3 days
(20 Reviews)

Hello, I have gone through project and understood the requirement. I will be able to create a PHP script which will server the purpose. I am a full time dedicated freelancer having 8 years of PHP and mysql expertise an More

$100 USD in 3 days
(47 Reviews)

Greeting, I have understood your generic php script task and can do it with your 100% satisfaction. Please ping me for more discussion. I have more than 5 years of experience in MySQL, PHP

$150 USD in 2 days
(18 Reviews)

Hello Sir, hope you are fine, I am interested in your work "Generic PHP script". I will create this application in Custom PHP I have 5 year experience in Web Development Service I am able to this job quickly More

$150 USD in 3 days
(40 Reviews)

Ready to cooperate with you. My experience is more than 6 years. I work with php, mysql, js, css, html.

$111 USD in 2 days
(18 Reviews)

Hi, I'm Ing of systems With over 10 years of experience developing large-scale applications and providing web technology solutions for freelancers , small, medium and large businesses. Habilidades y experiencia rele More

$138 USD in 2 days
(28 Reviews)

A proposal has not yet been provided

$144 USD in 2 days
(9 Reviews)

I completely understand your requirements. I have experience working in CSV parsing and insertion in database. I will also use proper validations before inserting data in database. I will also use transactions, so that More

$50 USD in 2 days
(11 Reviews)