Vou tentar explicar por etapas porque esta difícil conseguir resolver isso. No formulário de editar em vez de substituir só a imagem que o admin preencheu ele está substituindo todas as imagens do form: EXEMPLO: FORM de cadastro input file 1 - preencheu input file 2 - preencheu input file 3 - preencheu input file 4 - preencheu beleza o admin cadastrou 4 fotos Agora no FORM de editar. input file 1 - preencheu input file 2 - não preencheu input file 3 - não preencheu input file 4 - não preencheu Ele atualizou só a 1ª Em vez de atualizar só a foto 1 e continuar as outras 3 anteriores o form substitui todas as fotos do editar. alguém poderia me ajudar? OBS: Inserir CODEBOX está dando erro o código é esse: <?php // Dados do produto $id=$_POST['id2']; $titulo=$_POST['titulo']; $noticia=$_POST['noticia']; $dia=$_POST['dia']; $mes=$_POST['mes']; $ano=$_POST['ano']; $local=$_POST['local']; $autor=$_POST['autor']; $video=$_POST['video']; // Arquivo de Foto $foto1=$file_name; $foto2=$file2_name; $foto3=$file3_name; $foto4=$file4_name; $foto5=$file5_name; $foto6=$file6_name; $foto7=$file7_name; $foto8=$file8_name; $foto9=$file9_name; $foto10=$file10_name; $foto11=$file11_name; $foto12=$file12_name; $foto13=$file13_name; $foto14=$file14_name; $foto15=$file15_name; $foto16=$file16_name; $foto17=$file17_name; $foto18=$file18_name; $foto19=$file19_name; $foto20=$file20_name; // Foto 1 if ($foto1 != ""){ $foto1d = date("dmYHis"); $foto1n = $foto1d."1.jpg"; copy($file, "../fotos_eventos/".$foto1n); unlink($file); }else{ $foto1n = ""; } // Foto 2 if ($foto2 != ""){ $foto2d = date("dmYHis"); $foto2n = $foto2d."2.jpg"; copy($file2, "../fotos_eventos/".$foto2n); unlink($file); }else{ $foto2n = ""; } // Foto 3 if ($foto3 != ""){ $foto3d = date("dmYHis"); $foto3n = $foto3d."3.jpg"; copy($file3, "../fotos_eventos/".$foto3n); unlink($file); }else{ $foto3n = ""; } // Foto 4 if ($foto4 != ""){ $foto4d = date("dmYHis"); $foto4n = $foto4d."4.jpg"; copy($file4, "../fotos_eventos/".$foto4n); unlink($file); }else{ $foto4n = ""; } // Foto 5 if ($foto5 != ""){ $foto5d = date("dmYHis"); $foto5n = $foto5d."5.jpg"; copy($file5, "../fotos_eventos/".$foto5n); unlink($file); }else{ $foto5n = ""; } // Foto 6 if ($foto6 != ""){ $foto6d = date("dmYHis"); $foto6n = $foto6d."6.jpg"; copy($file6, "../fotos_eventos/".$foto6n); unlink($file); }else{ $foto6n = ""; } // Foto 7 if ($foto7 != ""){ $foto7d = date("dmYHis"); $foto7n = $foto7d."7.jpg"; copy($file7, "../fotos_eventos/".$foto7n); unlink($file); }else{ $foto7n = ""; } // Foto 8 if ($foto8 != ""){ $foto8d = date("dmYHis"); $foto8n = $foto8d."8.jpg"; copy($file8, "../fotos_eventos/".$foto8n); unlink($file); }else{ $foto8n = ""; } // Foto 9 if ($foto9 != ""){ $foto9d = date("dmYHis"); $foto9n = $foto9d."9.jpg"; copy($file9, "../fotos_eventos/".$foto9n); unlink($file); }else{ $foto9n = ""; } // Foto 10 if ($foto10 != ""){ $foto10d = date("dmYHis"); $foto10n = $foto10d."10.jpg"; copy($file10, "../fotos_eventos/".$foto10n); unlink($file); }else{ $foto10n = ""; } // Foto 11 if ($foto11 != ""){ $foto11d = date("dmYHis"); $foto11n = $foto11d."11.jpg"; copy($file11, "../fotos_eventos/".$foto11n); unlink($file); }else{ $foto11n = ""; } // Foto 12 if ($foto12 != ""){ $foto12d = date("dmYHis"); $foto12n = $foto12d."12.jpg"; copy($file12, "../fotos_eventos/".$foto12n); unlink($file); }else{ $foto12n = ""; } // Foto 13 if ($foto13 != ""){ $foto13d = date("dmYHis"); $foto13n = $foto13d."13.jpg"; copy($file13, "../fotos_eventos/".$foto13n); unlink($file); }else{ $foto13n = ""; } // Foto 14 if ($foto14 != ""){ $foto14d = date("dmYHis"); $foto14n = $foto14d."14.jpg"; copy($file14, "../fotos_eventos/".$foto14n); unlink($file); }else{ $foto14n = ""; } // Foto 15 if ($foto15 != ""){ $foto15d = date("dmYHis"); $foto15n = $foto15d."15.jpg"; copy($file15, "../fotos_eventos/".$foto15n); unlink($file); }else{ $foto15n = ""; } // Foto 16 if ($foto16 != ""){ $foto16d = date("dmYHis"); $foto16n = $foto16d."16.jpg"; copy($file16, "../fotos_eventos/".$foto16n); unlink($file); }else{ $foto16n = ""; } // Foto 17 if ($foto17 != ""){ $foto17d = date("dmYHis"); $foto17n = $foto17d."17.jpg"; copy($file17, "../fotos_eventos/".$foto17n); unlink($file); }else{ $foto17n = ""; } // Foto 18 if ($foto18 != ""){ $foto18d = date("dmYHis"); $foto18n = $foto18d."18.jpg"; copy($file18, "../fotos_eventos/".$foto18n); unlink($file); }else{ $foto18n = ""; } // Foto 19 if ($foto19 != ""){ $foto19d = date("dmYHis"); $foto19n = $foto19d."19.jpg"; copy($file19, "../fotos_eventos/".$foto19n); unlink($file); }else{ $foto19n = ""; } // Foto 20 if ($foto20 != ""){ $foto20d = date("dmYHis"); $foto20n = $foto20d."20.jpg"; copy($file20, "../fotos_eventos/".$foto20n); unlink($file); }else{ $foto20n = ""; } // Fim de Foto require("config.php"); $resultado = mysql_query("UPDATE `tabela` SET titulo='$titulo', noticia='$noticia', dia='$dia', mes='$mes', ano='$ano', local='$local', autor='$autor', video='$video', foto1='$foto1n', foto2='$foto2n', foto3='$foto3n', foto4='$foto4n', foto5='$foto5n', foto6='$foto6n', foto7='$foto7n', foto8='$foto8n', foto9='$foto9n', foto10='$foto10n', foto11='$foto11n', foto12='$foto12n', foto13='$foto13n', foto14='$foto14n', foto15='$foto15n', foto16='$foto16n', foto17='$foto17n', foto18='$foto18n', foto19='$foto19n', foto20='$foto20n' WHERE id='$id'"); echo "<meta HTTP-EQUIV='Refresh' CONTENT='0;URL=eventos.php'>"; ?> [/codebox]