Jump to content

[SOLVED] Gallery problems


M.Paaske

Recommended Posts

Hey all, I have once posted a thread but trying again to maybe get the last help I need on my gallery script.. To exactly explain what I want:

 

I want small pictures (thumbnails) which links to a div box in the same window, not by opening another window..

I want the small thumbs to open a big version of the picture in a div box, not an iframe since that pretty much ruined the picture some how. I have almost finished the script but I'm stuck and need help spotting the, probably, little mistake I've made:

--------------------------------------------------------------------------------------------------------------

<?php

  phpinfo();

$connect = mysql_pconnect("HIDDEN","HIDDEN","HIDDEN")or die("cant connect "mysql_error());

$db = mysql_select_db("HIDDEN")or die("connecter ikk til DB "(mysql_error());

$sql = mysql_query("SELECT * FROM `galleri` limit 0,5");

 

while($myrow = mysql_fetch_array($sql)){

  echo"test";

  echo"<a href='gallery_test.php?ID=".$myrow['ID']."'>

  <img src='Uploaded_billeder/thumb/".$myrow['filename']."'>[/url]";

 

  }

 

if($_GET['ID']){

 

  $sql = mysql_query("SELECT * FROM `galleri` where ID =".$_GET['ID']."")

  $bigmama = mysql_fetch_array($sql);

 

  echo"<div style='position: relative; height: auto; width: auto;'>

  <img src='Uploaded_billeder/".$bigmama['filename']."'>

  </div>";

 

  }

 

mysql_close($connect);

 

?>

----------------------------------------------------------------------------------------------------

 

Been troubling with this for weeks... Would grant the hero with the answer with lots of thanks

Link to comment
https://forums.phpfreaks.com/topic/119912-solved-gallery-problems/
Share on other sites

Hmm okay thanks for info^^ :D

 

But the problem I had with iframe was that... First of all I couldn't center the image in the iframe, and second, people could click the iframe to zoom in on the picture and that pretty much (eventually) made the picture dissapear! :o

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.