hamisht: The file needs to re-named while being uploaded, or after uploading, because someone might upload 'photo1.jpg' and overwrite someone elses 'photo1.jpg'.
I would put all the images in a folder (such as /images) then put each user's images in a subfolder (such as images/15/ or images/10/) then there's no worries with overwriting.