Hello to all,
I'm building a site using php and mysql and I'm stuck on a last piece of functionality. I'm allowing users to upload pictures to a mysql table which will then be displayed on my site. I have no problem uploading or displaying the images.
The problem lies when I want the user to see a larger version of the pictures. I cant figure out a way so that when the user clicks on one of the smaller images a pop up window is opened with the large image and next and previous buttons.
Any help would be appreciated
here is my code
So how do i make an image pop up when clicked?Code:$result = mysql_query("SELECT * FROM photo WHERE dogname ='$name'"); $i=0; $num=mysql_numrows($result); //echo "<table>"; while($r=mysql_fetch_array($result)) { $dogname=$r["dogname"]; $caption=$r["caption"]; $dogphoto=$r["dogphoto"]; $id=$r["id"]; if($i==0){ echo"<tr>"; } echo "<td><img src='$dogphoto' width='200' height='150'></td>"; $i++; if($i==3){ echo "</tr>"; $i=0; } }
After some research I'm sure I have to use javascript. The problem is im not very familiar with that language.
Thanks in advance!


Reply With Quote

Bookmarks