Input type file with pre-selected image

0

I have the path of an image in the ex database: admin / conteudo_admin / imagem_noticia / atletas.jpg

I have this input type="file" and I wanted this image to be selected

<input type="file"  id="imagem" name="imagem" >
    
asked by anonymous 06.06.2016 / 17:39

1 answer

1

Setting this directly in ..input type="file".. does not. You can however do in text:

<input type="file" id="imagem" name="imagem">
<span><?php echo $imagem_da_BD; ?></span>

You can also place the image just after the input:

<input type="file" id="imagem" name="imagem">
<img src="<?php echo $imagem_da_BD; ?>">
    
06.06.2016 / 17:44