/    Sign up×
Community /Pin to ProfileBookmark

rename image and link to it

I want to have a form so people can upload images. i don’t want the images in the database i want them to go to a folder but i would like for it to be renamed when it is uploaded. so if someone uploads “my_dog.jpg” the form changes that to “0001.jpg” that is then added in the database “0001.jpg” and the image is placed inside a folder on my server.

then i could call the image like;

<img src=”/images/users/$image />

there would a connect above this etc, but could something like this be done. If yes please tell me but don’t post the code i want to try and work out how to change the name my self.

thanks for any help you do post

to post a comment
PHP

1 Comments(s)

Copy linkTweet thisAlerts:
@crh3675Apr 21.2004 — The process will work like this:

Select image

Post Form data

Extract file name

Change file name

Save to folder

This processing is all server-side after submitting the image through the form.
×

Success!

Help @chris9902 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...