Hi all im working ona new forum gallery hack, which will take all the images posted to a forum and show them all nicely..
Anyway im having a few probs with it, ive got the initial query ok, but i cant get it to skip entrys that have no filedata in the attachment (the blank attachments vb seems to create)
Im using basic code at mo no $DBsite query stuff just to get it working i,ll concentrate on all of that later.. anyway i need a helper or helpers and i will have this done anyday..
the main prob is the one stated
anyway heres the code i have for it at the moment which isnt working too well at all..
PHP Code:
while($r = mysql_fetch_array($galquery1)){
$galentid=$r['attachmentid'];
$galtime=$r['dateline'];
$galentry=$r['filedata'];
$galentryname=$r['filename'];
$galuserid=$r['userid'];
$galentryvisible=$r['visible'];
if(!$galentry){
$imgshowno = "No Image";
echo ("$imgshowno");
}
else
{
$imgshow = "<img src = $bburl/attachment.php?postid=$galentid ><br>";
$imgshow.= "<a href = $bburl/attachment.php?postid=$galentid>Full Image</a><br><br>";
echo ("$imgshow");
}
Note I have it putting in a "No image" just for test purposes at current