
my code is:-
$search=$_POST["search"];
$sql="SELECT * FROM search WHERE productname ='$search'";
$result = mysql<em>query($sql) or die(mysql</em>error());
echo "<table border='1'>
<tr>
<th>Id</th>
<th>Product</th>
<th>Producy Name</th>
<th>Price Per Product</th>
</tr>";
$row = mysql_fetch_array($result);
extract($row);
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" <img src =". isset($row['product']) . "> "</td>";
echo "<td>" . $row['productname'] . "</td>";
echo "<td>" . $row['priceperproduct'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysql_close($con);

PHP retrieve image from mysql database:
<?php
mysql_connect("localhost","username","password")
or die("Failure to communicate");
mysql_select_db("db")
or die("Could not connect to Database");
$query = "SELECT content,size,type FROM upload WHERE id=1;";
$result=mysql_query($query);
mysql_close();
$content=mysql_result($result,0,"content");
$size=mysql_result($result,0,"size");
$type=mysql_result($result,0,"type");
header('Content-Type: '.$type);
print $content;
?>
If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.
Ask your questions, our development team will try to give answers to your questions.