Steps to run the script:
-
You must create a database named 'csvdata' manually in your localhost phpmyadmin first.
Then Run this sql in your php myadmin sql field,
CREATE TABLE IF NOT EXISTS csvdata
(
id
int(255) NOT NULL AUTO_INCREMENT,
name
text NOT NULL,
email
varchar(200) NOT NULL,
PRIMARY KEY (id
)
)
Downlod the files to zip file and extract to htdocs.
Goto your browser and use address like "http://localhost/csvtodatabase" to run your project
upload the 'data.csv' from the location "Your drive*/xampp/htdocs/csvtodatabase/csvfile".
Then check it in your phpmyadmin.
========================================
You can customize your CSV file any time. But you have to remember to modify the titel fileds of your database table.
If you face any trouble, please email me to '[email protected]'.
Thank you Evan [email protected]