Change Image Name After Upload

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
Shyft
Forum Newbie
Posts: 7
Joined: Sat May 22, 2004 3:03 pm

Change Image Name After Upload

Post by Shyft »

I have a script in which the user uploads an image. I then create a thumbnail using imagemagick and store it in another folder. Then it takes the file name and stores that with the accompanying information in a MySQL database when the form is submitted. I was wondering how I would change the actual name of the uploaded file (as well as the thumbnail). I heard something about saveas() though I don't know at all how it works. Any help?
User avatar
maqmus
Forum Commoner
Posts: 30
Joined: Mon Mar 08, 2004 1:10 pm

Post by maqmus »

Look at rename()
Shyft
Forum Newbie
Posts: 7
Joined: Sat May 22, 2004 3:03 pm

Post by Shyft »

thanx. It's working now with that =)
Post Reply