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
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

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.