html - Unable to output an image with PHP -


$servername = "localhost"; $username = "root"; $password = ""; $conn = mysqli_connect($servername, $username, $password, "db_test"); if (!$conn) {     die("connection failed: " . mysqli_connect_error()); }else{     $query = "select * `tab_gallery`";     $result = mysqli_query($conn,$query);     while($row = mysqli_fetch_assoc($result)) {         header("content-type: image/jpeg");         $image = $row['f_photo']; ?>         <img src="data:image/jpeg;base64,<?php echo base64_encode($image); ?>" /> <?php   } } mysqli_close($conn); ?> 

i uploaded jpeg , i'm trying output same image. in browser this.

enter image description here