images cannot diplay
<p>i have upload the images in databases but when i want to display it the images cannot display..i don't know why it cannot display..maybe have something wrong in my coding..can you please help me??</p>

<p>upload.php</p>

<pre><code>&lt;?php

$id = $_POST['account'];
$code = $_POST['code'];
$price = $_POST['price'];

echo $file = $_FILES['image']['tmp_name'];
if (!isset($file))
  echo "Please select an image.";
else
{
 $image = addslashes (file_get_contents($_FILES['image']['tmp_name']));
 $image_name = addslashes ($_FILES['image']['name']);
 $image_size = getimagesize($_FILES['image']['tmp_name']);

 if($image_size==FALSE)
  echo "That's not an image.";
else
{
if (!$insert = mysql_query("INSERT INTO menu 
    VALUES('$code','$price','$image','$id')"))
echo "Problem uploading images.";
else
{
  $lastid = $code;
  echo "Image uploaded.&lt;p /&gt;Your image:&lt;p /&gt;&lt;img src=get.php?id=$lastid&gt;";
}

   }
 }
 ?&gt;
</code></pre>

<p>get.php</p>

<pre><code> &lt;?php
 $con = mysql_connect("localhost","root","");
 if (!$con)
 {
 die('Could not connect: ' . mysql_error());
 }

 mysql_select_db("food", $con);


 $id = addslashes($_REQUEST['FoodId']);

 $image = mysql_query("SELECT * FROM menu WHERE FoodId=$id");
 $image = mysql_fetch_assoc($image);
 $image = $image['image'];

 header("Content-type: image/jpeg");

 echo $image;
 ?&gt;
</code></pre>
