

<?php

include ('mysqli_con.php');
if(isset($_POST["submit"])){
$filename = $_FILES['img']['name'];
$file_tmp = $_FILES['img']['tmp_name'];
$filetype = $_FILES['img']['type'];
$filesize = $_FILES['img']['size'];
for($i=0; $i<=count($file_tmp); $i++){
if(!empty($file_tmp[$i])){
$name = addslashes($filename[$i]);
$temp = addslashes(file_get_contents($file_tmp[$i]));


if(mysql_query("Insert into multiple(name,image) values('$name','$temp')")){
}
else{
echo "failed";
echo "<br />";
}
}
}
}
$sql = "SELECT * FROM multiple";
$res = mysqli_query($conn, $sql);
while($row = mysqli_fetch_array($res)){
$displ = $row['image'];




echo '<img src="data:image/jpeg;base64,&#39;.base64_encode($displ).&#39;" />';
echo "<br />";
}
?>
