Non l'ho testato ma la strada è questa:
for($i=1; $i<5; $i++)
{
$target_path = "foto/";
$target_path = $target_path . basename($_FILES['file'.$i]['name']);
$_FILES['file'.$i]['tmp_name'];
move_uploaded_file($_FILES['file'.$i]['tmp_name'], $target_path);
$risultato="'".$_FILES['file'.$i]['name']."',";
}
$risultato = preg_replace("/$,/", $risultato);
$query_manual = "INSERT INTO ordinitnt (foto1,foto2,foto3,foto4)
VALUES ('$risultato')";
mysql_query($query_manual) or die(mysql_error());
// $idcli non serve a niente
![]()