tags:

views:

79

answers:

1

hi,

I have asked a question regarding updating a csv file's contents to the db @Question

Now I want to add this functionality, like my db will contain url to images that are stored on a prespecified 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 prespecified folder
  3. update the corresponding field in the db table with the url of the image
+1  A: 

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
@tdolsen thanks was looking for something more any ways thanks
Anand