Quick Question

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
jimmyp3016
Forum Newbie
Posts: 3
Joined: Tue Jan 09, 2007 1:30 pm

Quick Question

Post 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
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post 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().
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

You also may want to look at http://www.phpclasses.org to search for "upload" and see what code they have.
(#10850)
Post Reply