form
<form action="processa" method="post" enctype="multipart/form-data">
<input type="file" name="file"/><br/>
<input type="submit" value="enviar"/>
insertion file
$ sql="INSERT INTO tb_imgbd (img) VALUES ('$ file')"; $ reg = mysqli_query ($ connection, $ sql); header ("location: display.php");
displays the images
$ sql="SELECT * FROM tb_imgbd"; $ reg = mysqli_query ($ connection, $ sql);
while ($ log = mysqli_fetch_array ($ reg)) { $ photo="img /".$ record ['img']; echo $ photo; $ separator="img /"; echo ""; }