stvchez Posted April 2, 2007 Share Posted April 2, 2007 I have a question about an admin webpage to upload incremental csv files to a master table. Here is what I do currently: - I get an excel file (turn it into a csv) - go to phpMyAdmin and upload the csv from the SQL tab simple, it works. What I would like to do is this: have the client upload the same .csv file via a webpage, a form upload field, which in turn, adds the few more records to the existing table. When I upload via phpMyAdmin, i see the SQL that it spits out, but not sure how to implement. If anyone has done a similar project, I'd much appreciate it. thanks Quote Link to comment Share on other sites More sharing options...
dough boy Posted April 2, 2007 Share Posted April 2, 2007 What I built for our back-end administers sounds like what you need. Basically you have a form for the file to be uploaded through. Then use the fgetcsv () PHP function to "parse" your data, and add that to a query for insertion. Quote Link to comment Share on other sites More sharing options...
stvchez Posted April 2, 2007 Author Share Posted April 2, 2007 that sounds exactly like what I would need. I have not use the fgetcsv function before. would it be possible to send a quick code snippet or point me in the right direction to research this out thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.