I'm trying to upload multiple files simultaneously using PHP, but i dont know why its not working. below is code :
<form action="" method="post" enctype="multipart/form-data">
Send these files:<br />
<input name="name" type="file" /><br />
<input name="pictures" type="file" /><br />
<input type="submit" value="Send files" />
$target = $_POST['path'];
$fileone = $_FILES['name']['name'];
$filetwo = $_FILES['picture']['name'];
$Tdate = date('dFY');
$path= "/home/path/images/".basename($_FILES['upload']['name']) ;
echo "copied succesfully to ".$destfile."<br/>";
echo "failed to copy<br/>";
The problem im facing is if i browse and try to upload both files togather then the script is just going in loop and doing nothing, however if I try to upload any one of them, then it works!
Do you think it could be some problems with php.ini settings or maybe firewall on server? I'm using LAMP with apf firewall.