我使用以下代码从数据库中显示图像此代码以不可读的格式获取图像,在数据库中我在“blob”中创建图像类型请帮助我在用户输入图像名称时动态显示图像它应该显示仅图像
我的数据库表表名存储
id | name |image
---------------
1 | xxxx| (image)
<?php
mysql_connect("localhost","root","")or die(mysql_error());
mysql_select_db("databaseimage") or die(mysql_error());
$query = "SELECT * FROM store where fname = 'ss' ";
$info = mysql_query($query) or die(mysql_error());
$num = mysql_num_rows($info);
$sql ="select image from store where fname = 'ss' ";
$result = mysql_query($sql) or die(mysql_error());
if($result){
echo'
<table align="center" cellspacing="0" cellpadding="5" bgcolor="#ffffff" border=1 bordercolor="#2696b8">
<tr>
</tr>';
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
echo'<tr>
<td align="center" width="150" height="200"><img src="datadesign.php' . $row['image'] . '">
</tr>';
}
echo'</table>';
}
else{
echo'<h1> System Error </h1> table ';
exit();
}
mysql_close();
?>