As title. I am trying to upload a CSV files content to my Mysql database. I know this can be done using PHPmyadmin But I want to be able to do this via a webpage. I also want to be able to add data to another field which isnt in the cvs. e.g CSV has name code status data I then want to add todays date to each line as its inserted. Anyone got any ideas
fgetcsv should do you. Just open a file pointer and then it basically gives you an array of all the data in the csv. Then add it to the database as normal. http://uk.php.net/fgetcsv Ned
Found that soon after posting hehe. Had a spot of bother getting the insert command to work but thats now sorted. Now all I need to do is get it to pull the data from a file hosted on the client side instead of server side and I`m laughing