PDA

View Full Version : Need help with simple gallery hack


TechTalk
01-22-2002, 11:56 PM
Hi everyone,
I want to make a very simple gallery hack but I dont have a clue what i am doing. I used to use Image Gallery by ryangran@advsyseng.com but it doesnt work on the latest version of VB and I cannot get him to support it. This is a real shame because it was a damn nice hack.

Anyway this is all i have so far:


<?php

require("./global.php");



$getattachments=$DB_site->query("SELECT userid,filedata from attachment WHERE userid=$userid");
while ($thumbnails=$DB_site->fetch_array($getattachments)) {
$thumbnails[filedata] = $theimage;
echo "<img src=\"$theimage\" width=30 height=30><br>";
}


?>


All the images come out broken :( I am calling it like this:
http://www.mysite.com/gallery.php?userid=1

Thanks in advance for any help you may offer

Admin
01-23-2002, 07:50 AM
Try:
<?php
error_reporting(7);
require("./global.php");

$getattachments=$DB_site->query("SELECT attachmentid FROM attachment WHERE userid=$userid");
while ($thumbnails=$DB_site->fetch_array($getattachments)) {
echo "<img src=\"attachment.php?attachmentid=".$thumbnails['attachmentid']."\" width=\"30\" height=\"30\"><br>";
}


?>