PHP Import Script to Upload .csv Files

import spreadsheet on website I have been hired as a PHP programmer multiple times to write custom import scripts for various client’s websites. The most recent project was for a company in the radio broadcasting industry. They needed a website solution to easily aggregate playlists from their radio stations by uploading csv files through a web form.

I coded a script with the following functionality:

  • A user had to log in to access the import script.
  • A report of prior data the user had submitted is viewable once logged in.
  • An HTML form was coded to allow uploads of csv files. Validation was added to check for the proper data format.
  • The csv file was parsed, and data inserted or updated in the database.  A running log of additions and updates was kept during the import process.
  • Once the import was complete, a summary of all changes were displayed to the user.
  • A new report showing the updated data then displayed.

Coding this PHP import script will save my client hours of manually having to accumulate data on a regular basis and then manually import it into a database.

When the project was complete, the client said “Wow, this is perfect! I’m sure I will have more work for you in the near future.”

Contact me if you need a custom script written to upload data on your website.