我已经使用文本框将图像存储到SQL数据库并将其存储在数据库中,我无法从数据库中检索图像。我使用以下代码显示但它不起作用
// Grab the data from our people table
$sql = "select * from upload";
$result = mysql_query($sql) or die("Could not access DB: " . mysql_error());
while ($row = mysql_fetch_assoc($result)) {
echo "<div class=\"picture\">";
echo "<p>";
// Note that we are building our src string using the filename from the database
echo "<img src=$row['data']/>";
echo $row['title'] . " " . $row['title'] . "<br />";
echo "</p>";
echo "</div>";
}