dynamic upload image

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
User avatar
amirbwb
Forum Commoner
Posts: 89
Joined: Sat Oct 30, 2010 6:10 pm

dynamic upload image

Post 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
Post Reply