Page 1 of 1

Quick Question

Posted: Tue Jan 09, 2007 1:37 pm
by jimmyp3016
Hey Guys,

Im looking for a script that can do the following things. If one pops off the top of your head let me know.

Its an image upload script that can:

1. Upload an image to a directory
2. Check if the image name exsits and if it does then rewrite it with a random name.
3. Copy the file name up to a field in a mysql database.

Ive played around with a few custom scripts to no avail. Would be very helpful if someone had one like that.

Thanks Guys

-Jimmy

Posted: Tue Jan 09, 2007 3:11 pm
by feyd
We've had many threads regarding doing exactly what you are wishing to do, many with code.

http://php.net/features.file-upload should be of interest, as should file_exists() and basename().

Posted: Tue Jan 09, 2007 4:35 pm
by Christopher
You also may want to look at http://www.phpclasses.org to search for "upload" and see what code they have.