I'm uploading multiple files.
Main function works fine, but I have to change the names of uploading files Like:
name1.jpg
, name2.jps
, name3.jpg
, ...
$i = 1;
if(move_uploaded_file($_FILES['upl']['tmp_name'], 'uploads/name'.$i++.'.'.$extension)){
echo '{"status":"success"}';
exit;
}
Number $i
should grow with amount of uploaded files.
I hope that explained it correctly.