Take the tour ×  I'm building the image uploading component for
a social networking site. I am uploading multiple files using
imgfile[] as the <input>'s name and this part is working fine.
$upload_form.= "<ul class='imgfile_ul' id='$imgfile_ul_id'
style='padding:0px'>"; $upload_form.=      "<li class=''
id='$imgfile_li_id' style='border:0px'><label
class='msgs_in_black'>Filename:</label><input type='file'
name='imgfile[]' class='imgfile_cls' id='$imgfile_id'/></li>";
$upload_form.= "</ul>";  My question is about what happens when
I display the uploaded files.          $temp_name =
$_FILES['imgfile']['tmp_name'][$i];         $file_name =
$_FILES['imgfile']['name'][$i];  If two users upload files at
the exact same time from two different places, is there a chance
it will use the same filename and I'll receive the other user's
files instead of the correct one?  share|improve this question
add comment  2 Answers  PHP creates a unique temporary file for
every uploaded file - the odds that two different uploadds w