trying to display all image from database. type of my image is long blob.
but on my gallery.php it keep printing the 1st image in database.
i have a image.php file
<?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);
?>
i also have a gallery.php where iam trying to display all different images of user
$id = $_SESSION['user_id'];
$sql = "SELECT * FROM image WHERE user_id = $id";
$result = mysql_query($sql);
while($row = mysql_fetch_assoc($result))
{
<img src="image.php?id='.$row['image_id'].'" />
}