} if (!empty($_FILES['fileFoto3']['tmp_name'])) { $uploaded_files_location = '../../fotos/'; //This is the directory where uploaded files are saved on your server $final_location = $uploaded_files_location . basename($_FILES['fileFoto3']['name']); move_uploaded_file($_FILES['fileFoto3']['tmp_name'], $final_location); $objProductoEntidad->setFoto3("fotos/" . $_FILES['fileFoto3']['name']); } else { $objProductoEntidad->setFoto3($sTmpFoto3); } if (!empty($_FILES['fileFoto4']['tmp_name'])) { $uploaded_files_location = '../../fichas/'; //This is the directory where uploaded files are saved on your server $final_location = $uploaded_files_location . basename($_FILES['fileFoto4']['name']); move_uploaded_file($_FILES['fileFoto4']['tmp_name'], $final_location); $objProductoEntidad->setDocumento("fichas/" . $_FILES['fileFoto4']['name']); } else { $objProductoEntidad->setDocumento($sTmpFoto4); } if ($_POST["accion"] == 'DEL_LOG') { if (DAOProducto::mantenimientoProducto($objProductoEntidad, array($_POST["accion"]))) { echo "1"; } else { echo "0"; } } else { if (DAOProducto::mantenimientoProducto($objProductoEntidad, array($_POST["accion"]))) { header("location: MNTproducto.php"); } else { header("location: INSproducto.php?error=1"); }