I want to show image on php from mysql database. I use the following code:
$last_id = mysql_insert_id();
echo "Image Uploaded. <p /> Your image <p /> <img src=get.php?id=$last_id>";
<?php
mysql_connect("localhost","root","") or die(mysql_error());
mysql_select_db("image") or die(mysql_error());
$id = $_REQUEST['id'];
$result = mysql_query("SELECT * FROM image WHERE id = $id");
$image = $result['image'];
header("Content-type: image/jpeg");
echo $image;
?>