trying to print last image from database. my image type is long blob.
note this is all one file.
//first get the last id in database and get last image form database <?php $lastid = mysql_insert_id(); $image = mysql_query("SELECT * FROM image WHERE user_id = $id ORDER BY image_id DESC"); $image = mysql_fetch_assoc($image); //get access to image table $image = $image['image']; base64_decode($image); ?> <body> // i want to print the image here. //i was thinking some thing like this. //<img src="$image" /> but it doesnt work also echo $image dont work too </body>