0

I have asked a question regarding updating a csv file's contents to the db here.

Now I want to add this functionality, like my db will contain url to images that are stored in a pre-specified folder on the server.

The csv files will contain the urls as to where these images reside on the client side. Now when I click an upload the following should happen

  1. My file must read the location of image on the client side
  2. Must copy the image from the client to the server's pre-specified folder
  3. update the corresponding field in the db table with the url of the image
Community
  • 1
  • 1
Anand Sunderraman
  • 7,900
  • 31
  • 90
  • 150
  • Can you add more meat to points you have mentioned as then it would help to provide some useful suggestions. – Rachel Mar 17 '10 at 13:26

1 Answers1

1

You cannot access the client with PHP. Not even with Javascript or Flash(i believe). At least not without some sort of server running on the client, but that would be quite stupid.

If you simply want to upload images to the server, and let any client do this(at least almost any), there are a bunch of free and payed software using smart ways to accomplish this. Take a look at Uploadify for instance.

This doesn't answer your question, so as how to read data from an csv-file, the str_getcsv should do the trick.

tdolsen
  • 456
  • 1
  • 4
  • 8