it keep on printing 1st image from database. but i want to print all the differenct images.
$id = $_SESSION['user_id'];
//select images from database
$sql = "SELECT * FROM image WHERE user_id = $id ORDER BY image_id DESC";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result))
{
<img src="image.php?id='.$row['image_id'].'" />
}
image.php
<?php
session_start();
include("connect.php");
$user_id = $_SESSION['user_id'];
$image = mysql_query("SELECT * FROM image WHERE user_id = $user_id ");
$image = mysql_fetch_assoc($image); //get access to image table
$image = $image['image'];
echo base64_decode($image);
?>