Renaming a file that a user uploads to site?


Posted on 16th Feb 2014 07:03 pm by admin

My site allows for registered users to upload images to the site under their own gallery. Currently it just leaves the file named as however the person has it named. But what I would like to do is something another site does, which is rename the files when the user uploads them. An example of how I would like it done:
A user whose username is "I Like Cheese" uploads a file named "whatever.jpg", but in the uploading form, they title the upload "Dog In the Rain". I`d like like "whatever.jpg" to be renamed to "Dog In the Rain_by_I Like Cheese.jpg" upon the upload process and use that new filename for the database information.

Did you know?Explore Trending and Topic pages for more stories like this.
How would I tell the system to rename the image file in that manner?
No comments posted yet

Your Answer:

Login to answer
225 Like 41 Dislike
Previous forums Next forums
Other forums

Collecting AOL Search Terms
I am attempting to collect AOL search terms. I know the code is correct (it works for google, bing,

Display search result
Hi!

I have a SQL database with information about albums and track (music).

This is wh

Displaying image pathname instead of image
Hello

Im trying to upload and then display images from a mysql database - Its only basic and

I need to increse 6hours more, and i don't know how???
I need to increse 6hours more, and i don't know how???
<tr>
<t

mysql select query problem
how can i select multiple fields from multiple table in one query like

i have table name t1 a

Code clarification
Hi

In the following code what could be the "search_print()" and where it could be

very easy question about SQL info
Hello,
I think that I have a very easy question.
I know how to create a form using php SQL and

timed header image rotation
I have a joomla site and I was trying to setup a rotating image based on timing NOT just refreshing

PHP Directory Listing Not working
Hey Guys,

I need help, I tried a ton of directory listing scripts and they all don't work. Al

PHP Error
On my .php page I have a drop down box that has several names in it. When a user clicks the name &am

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash