M.Paaske Posted August 15, 2008 Share Posted August 15, 2008 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']."'></a>"; } 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/119902-gallery/ Share on other sites More sharing options...
corbin Posted August 15, 2008 Share Posted August 15, 2008 $connect = mysql_pconnect("HIDDEN","HIDDEN","HIDDEN")or die("cant connect "(mysql_error()); You've got some weird stuff going on in your die(). $connect = mysql_pconnect("HIDDEN","HIDDEN","HIDDEN")or die("cant connect ".mysql_error()); Link to comment https://forums.phpfreaks.com/topic/119902-gallery/#findComment-617684 Share on other sites More sharing options...
M.Paaske Posted August 15, 2008 Author Share Posted August 15, 2008 Thank you for responding this fast but tryed days ago to test the script without the "or die" and didn't work Link to comment https://forums.phpfreaks.com/topic/119902-gallery/#findComment-617689 Share on other sites More sharing options...
corbin Posted August 19, 2008 Share Posted August 19, 2008 Check the error log, and see what error PHP is throwing. Link to comment https://forums.phpfreaks.com/topic/119902-gallery/#findComment-619784 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.