Log in

View Full Version : edit upload file



pavmoxo
04-18-2006, 04:29 PM
The form for edit



<input name="file" type="file" class="frm2" value="<? echo $arrN["foto"]; ?>" size="40">


for edit the path:




if ($_POST["editar"] == "Editar")
{
$sql = "select film_ID, titulo_mes, dia_sem, dia_mes, foto, titulo_film, realizador, actores, ano, pais, idade, duracao, genero, site, trailer, descricao from cinema where film_ID = ".$_POST["cinema"];
$query = query($sql);
$arrN = mysql_fetch_array($query);
}


When I edit, the path doesn't appears.

When I try to update a new foto the image disappears from the register



$sql = "update cinema set titulo_mes = '".$_POST["titulo_mes"]."', dia_sem = '".$_POST["dia_sem"]."', dia_mes = '".$_POST["dia_mes"]."', foto = '".$_POST["foto"]."', titulo_film = '".$_POST["titulo_film"]."', realizador = '".$_POST["realizador"]."', actores = '".$_POST["actores"]."', ano = '".$_POST["ano"]."', pais = '".$_POST["pais"]."', idade = '".$_POST["idade"]."', duracao = '".$_POST["duracao"]."', genero = '".$_POST["genero"]."', site = '".$_POST["site"]."', trailer = '".$_POST["trailer"]."', descricao = '".$_POST["descricao"]."' where film_ID = ".$_POST["film_ID"];