Guys here i am again I wanted to retrieve or display a picture in my database
I use this code is saving the path to the database
CODE
<?php
include("includes\connect.php");
require_once('includes\connect.php');
if(isset($_POST['Add']))
{
$sName=$_POST['sName'];
$category=$_POST['category'];
$description=$_POST['description'];
$price=$_POST['price'];
$quantity=$_POST['quantity'];
$picture=$_POST['picture'];
$status=$_POST['status'];
if(empty($sName)||empty($category)||empty($description)||empty($price)||empty($quantity)||empty($picture))
{
$problem=true;
$errors="<li>empty field(s)</li><br><li>fill up!</li>";
}
if(!$problem)
{
//add comment sucessfully added
$errors="<li>software hass been successfully added!</li><br><li>ready to add another one!</li>";
$query="Insert into products(sName,category,description,price,quantity,picture,status) values('$sName','$category','$description','$price','$quantity','$picture','$status')";
mysql_query($query);
}
ob_end_flush();
}
?>
i can store the path in the database.. but i can't retrieve it... heres the code for the retrieving.. what the output only is the path where i save the picture..not the picture itself
CODE
while($array=mysql_fetch_array($result))
{
extract($array);
echo "<tr>";
echo "<td align=\"center\"><font color=\"red\">".$sName."</font></td>";
echo "<td align=\"center\">".$category."</td>";
echo "<td align=\"center\">".$description."</td>";
echo "<td align=\"center\">".$price."</td>";
echo "<td align=\"center\">".$quantity."</td>";
//echo "<td align=\"center\">.$picture.</td>";
echo "</tr>";
}
echo "</table>";