Uploading TXT File data and updating Database using a PHP Script?

Hi Guys,

I want to create a script to upload a TXT File and at the same time update my database based on the data that is inside the TXT File.

Here is the exact TXT File I want to upload and it has the same format.

I also want to know how will the Script read and convert the TEXT file to be recognized by the database and update the information.

Thanks in Advance! And hoping to hear it from you soon.



Use fread(), file_get_contents() or file() to read the contents of the text file.

Then construct INSERT queries and send them to the database as usual, with mysql_query() calls.