Getimage.php
<?php
$hostname="localhost";
$username="root";
$password="tiger";
/* @var $dbhandle type */
$dbhandle = \mysqli_connect($hostname, $username, $password)
or die("Unable to connect to MySQL");
/* @var $select type */
$select= \mysqli_select_db($dbhandle,"sample")
or mysqli_error($dbhandle);
/* @var $itemId type */
$itemId= (\filter_input(\INPUT_GET,'name'));
$sql="select img from starterveg where itemId=$itemId";
$res2=mysqli_query($dbhandle,$sql);
$row= mysqli_fetch_assoc($res2);
mysqli_close($dbhandle);
header("Content-type: image/jpeg");
echo $row['img'];
?>
<body>
<img src="Getimage.php?itemId=oepsv1086" alt="image" id="img1">
</body>
> I'm not able to display the image from database into the html for.Instead the alt message only appears inside the html form