Jump to content

[SOLVED] thumbnails to fullsize


runei

Recommended Posts

Hello.

 

Im working on a simple photo gallery for my website. I have created pagination and thumbnails for the gallery, but i also want users to click a image and see it in full size. I briefly looked at a java script but i am not really sure how to proceed. Appreciate any suggestions.

 

runei

 

heres the java script.

<a href="javascript:window.open('path......','FullView','top=100,left=100,width=7 00,height=500,resizable=yes,scrollbars=no,location =no,menubar=no,status=no,toolbar=no'); void('');">

<img src="path....">

</a>

 

 

heres my code:

 

<?php
echo "<table cellspacing=\"10\"cellpadding=\"10\">";
$sql = "SELECT * FROM mar_photo";
$res = mysql_query($sql) or die (mysql_error());
//Puts it into an array

$pager = new PS_Pagination($con,$sql,15,20);
$rs = $pager->paginate();

$i = 0;
$max_columns = 6;

while($row = mysql_fetch_assoc($rs))
{
echo "<td border=\"1\" id=\"form\">";	
//Outputs the image and other data
echo "<img src=images/thumbs/".$row['photo']." > <br>";

echo "<b>Title :</b> ".$row['name'] . "<br> ";

echo "</td>";
      if(++$i == $max_columns) 
       {
           echo "</tr>";
           $i=0;
       }  // end if 
}

echo $pager->renderFullNav();

echo "</table>";

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.