dbradbury Posted June 3, 2010 Share Posted June 3, 2010 i had a php script that loads an image from an attachment from a post in my phpBB forum. all of a sudden it has stopped.. my code: loadimage.php <?php $image = $_GET['image']; header('Content-Type: image/jpeg'); readfile('forum/files/'.$image); ?> meettheplayers.php -The displaying the image part.... <?php if(isset($_GET['p'])) { $p = mysql_query("SELECT * FROM phpbb_posts WHERE post_id='$id'"); $pi = mysql_fetch_assoc($p); $pid = $p['forum_id']; $idpic = mysql_query("SELECT * FROM phpbb_attachments WHERE post_msg_id='$pid'"); $countid = mysql_num_rows($idpic); if($countid=0) { $row = mysql_fetch_assoc($idpic); if ($row['thumbnail'] =0) { print '<img src=loadimage.php?image='.$row['physical_filename'].'>'; } else { print '<img src=loadimage.php?image=thumb_'.$row['physical_filename'].'>'; } } else { // print '<img src=../pictures/nopic.png width="225px" height"300px">'; } } ?> i now that there is a part near the end blanked out (//). i did that as that pic shows for them all.. so ive changed the count rule to =0 and !=0 but they both just blank the middle part of the code.. anyone got any idea? if you need anymore info just tell me ill be happy to oblige Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.