> Hi Asaf,
> Thanks for the advice. That sounds like a good solution. One 
> thing I was 
> wondering about is...  when my PHP script saves the uploaded image to 
> the web server, how should the image be named [uniquely]? The 
> problem is 
> that if the user specifes the name of the image file, there's 
> a chance 
> he'll name another one the same way (and thus overwrite the 
> original). I 
> was thinking of maybe a dual approach, where the user gives the image 
> file a name, but then the PHP script appends, say, the table name and 
> record ID--so as to make the filename unique.
> What do you think? Is that how you do it? (Or is there a better way??)

If you have a table that stores information about the images then I suggest
you use the record ID alone (with the correct file-extension) as a filename.
This will allways be unique, otherwise you probably have trouble with your
dB aswell...

This is how I do it.

Joakim Andersson

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to