Page 1 of 1

dynamic upload image

Posted: Sun Dec 05, 2010 12:50 pm
by amirbwb
hello i'm creating a dynamic web where each user can upload his profile picture... i've googled "upload images to database" etc...
so i found many script but the prob is that if 2 users upload 2 different pictures with the same name it will be overwrite ...
so can someone please tell me how to make a dynamic upload form where:
-pictures require extension:jpg gif
-size max: 500 kb
-upload directory : avatar/
-each file will take the name of the users id
for example : if a user named="AMIR" and got an id="123" upload file called "picture01.jpg" it will be uploaded as 123.jpg
if this trick doesn't exist or is impossible, what is the solution ?
[For a demo of what I want see FACEBOOK]
thanks