We need a PHP script that will import a CSV file to a MySQL database. The MySQL table has already been created with 9 fields, and the CSV is already setup to match those fields exactly. I want to upload the CSV file and the script to the same directory, then run the script to import the data to the appropriate MySQL table. Please note: This project was completed by another coder but the code has stopped working. Therefore, I will test the code a few times before accepting the work 100%. I've attached a copy of the last coder's work. If you can fix that instead of creating a script from scratch, that will be acceptable.
PHP script to import data to MySQL
PHP and MySQL