dbradbury Posted December 16, 2009 Share Posted December 16, 2009 fairly hard to explain, but if needed ill explain in detail as far as i can go lol cliff notes version, i got a forum, phpbb one, and i made a post, and attached an image to it, so that image is now stored in the necessary folder. but i have a website, that uses the info off the website to make the site... if that makes sense lol but anyway i can get it to show the text part of the post, but not the attachment... if it helps, my code for that part is: $row6 = mysql_fetch_assoc($getprofileimage); print '<img src=http://host56.com/forum/files/'.$row6['physical_filename'].'.'.$row6['extension'].' />'; this should show it, but its just a transparent square with a border saying 'image' i looked in my FTP client at where the file is stored and the image i uploaded isnt an image now, its just a 'file', no extension. so does that mean phpbb has a function to convert the image? or am i doing it wrong?? any help would be greatly appreciated!! thanks Link to comment https://forums.phpfreaks.com/topic/185299-help-needed-uploaded-attachment-need-to-display-it-now/ Share on other sites More sharing options...
nafetski Posted December 16, 2009 Share Posted December 16, 2009 Well, sounds like a few things could be going wrong. The first place I would start is view the source, and see what the image path is. Make sure that your script is at least outputting a path that makes sense to you. However, even if it IS...the obvious second problem is the image on your web server. Are you sure that the file youa re looking at is the one that was generated from the image being uploaded? Try sorting by time just to make sure in your FTP client...if the image isn't browsable by your web browser, then the problem definitely stems from there. However, I don't have a fix to your problem without seeing more source code Link to comment https://forums.phpfreaks.com/topic/185299-help-needed-uploaded-attachment-need-to-display-it-now/#findComment-978310 Share on other sites More sharing options...
dbradbury Posted December 16, 2009 Author Share Posted December 16, 2009 <?php include("connect.php"); $instrument = $_GET['instrument']; $player = $_GET['player']; $profile = $_GET['profile']; $getinstrument = mysql_query("SELECT forum_name FROM phpbb_forums WHERE parent_id='5' ORDER BY forum_name ASC"); $instrumentcount = mysql_num_rows($getinstrument); ?> <table width="80%" border="0"> <tr> <td> <?php if($getinstrument==0) { echo "There Instruments Yet"; } else { $displayinstruments = mysql_query("SELECT * FROM phpbb_forums WHERE parent_id='5' ORDER BY forum_name ASC"); while($row = mysql_fetch_assoc($displayinstruments)) { echo '<a href=meettheplayers.php?instrument='.$row['forum_id'].'>'.$row['forum_name'].'</a><br>'; } } ?> </td> <td> <?php if(isset($_GET['instrument'])) { $playerletter = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id='$instrument'"); $playerletter = mysql_fetch_assoc($playerletter); $playerletter = $playerletter['forum_name']; $getplayer = mysql_query("SELECT * FROM phpbb_posts WHERE forum_id='$instrument' ORDER BY post_subject ASC"); $playercount = mysql_num_rows($getplayer); if($playercount==0) { echo ("There are no artists beginning with that letter as of this moment"); } else { $displayplayers = $getplayer; while($row1 = mysql_fetch_assoc($displayplayers)) { echo '<a href=meettheplayers.php?instrument='.$instrument.'&player='.$row1['post_id'].'>'.$row1['post_subject'].'</a><br>'; } } } else { echo "Please select an instrument!"; } ?> </td> <td> <?php if(isset($_GET['player'])) { $getprofile = mysql_query("SELECT * FROM phpbb_posts WHERE post_id='$player'"); $profilecount = mysql_num_rows($getprofile); if($profilecount==0) { echo "No profile for selected person yet!"; } else { $displayprofile = $getprofile; while ($row2 = mysql_fetch_assoc($displayprofile)) { $attachmentid = $row2['post_attachment']; print nl2br($row2['post_text']); } } } ?> </td> <td> <?php if(isset($_GET['player'])) { $getprofileimage = mysql_query("SELECT * FROM phpbb_attachments WHERE attach_id='$attachmentid'"); $countimage = mysql_num_rows($getprofileimage); if($countimage==0) { echo 'No Profile Picture Yet'; } else { $row6 = mysql_fetch_assoc($getprofileimage); print '<img src=http://stacksteadsband.host56.com/forum/files/'.$row6['physical_filename'].'.'.$row6['extension'].' />'; } } ?> </td> </tr> </table> heres my code, hope it helps Link to comment https://forums.phpfreaks.com/topic/185299-help-needed-uploaded-attachment-need-to-display-it-now/#findComment-978569 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.