I am trying to display my images from database. I have a variable named as $image. This variable contains jpeg names and I have a folder named as uploads which stores the images. I am looking to display my images in large size when clicking the thumbnail image Please Help me Anyone............
this is my code
<?php
include("connection.php");
$target="uploads/thumbnails/";
$email=$_SESSION['email'];
if($email==NULL)
{
header("location:register.php");
}
else
{
$start=0;
$limit=2;
$page=1;
if(isset($_GET['page']))
{
$page=$_GET['page'];
$start=($page-1)*$limit;
}
$sql=mysql_query("select * from photos where email='$email' LIMIT $start,$limit");
while($row=mysql_fetch_array($sql))
{
$image=$row['image_name'];
echo $image;
?>
<form action="" method="POST">
<div class="img">
<a target="_blank" href="uploads/".$image>//Error in this line
<img src="<?php echo $target.$row['thumb']; ?>" /></a>
</form>
</div>
<?php
}
$query=mysql_num_rows(mysql_query("select * from photos where '$email'=email"));
$total=ceil($query/$limit);
for($i=1;$i<=$total;$i++)
{
if($i==$page)
{
echo $i;
}
else
{
echo "<a href='?page=".$i."'>"." ".$i."</a>";
}
}
}
?>
where '$email'=email"