trying to buld gllery.php page. where i want to print all user image with 4 cols. and infity rows. all in one page
gallery.php
<?php
session_start();
include("connect.php");
$user = $_SESSION['username'];
if($user)
{
$user_id = $_SESSION['user_id']; //get user_id who ever is loged in
$image = mysql_query("SELECT * FROM image WHERE user_id = $user_id ORDER BY image_id DESC");
//$image = mysql_fetch_assoc($image); //get access to image table
$image = $image['image'];
base64_decode($image);
echo "your gallery<br/><br/><br/>";
echo "<a href='upload.php'>upload image</a>";
echo "<a href='index.php'>home</a><br/><br/><br/>";
echo '<table>'; // Your table
echo '<tr>'; // first table row
$count = 0;
while($image = mysql_fetch_assoc($image))
{
echo"
<td> //how to do it with using get.php
<img src=\"get.php?image_id=$lastid\"></img>//print image
</td>
";
$count++;
if($count == 4)
{
echo '</tr><tr>'; // Start a new row at 4 cells
$count = 0;
}
}
echo '</tr>';
echo '</table>';
}
?>