Jump to content

[SOLVED] Photo Not echoing out


graham23s

Recommended Posts

Hi Guys,

 

i can't understand this code, i'm getting the photo from the database fine say graham23s.jpg but when i put the <img src tags on it's only a red X

 

code:

 

       while ($row2=mysql_fetch_array($query2)) { 

        $id2_com = $row2[id]; 
        $quick_name = mysql_query("SELECT * FROM `membership` WHERE `id`='$row2[uid]' LIMIT 1") or die (mysql_error()); 

        while ($n=mysql_fetch_array($quick_name)){ 
        
        $mem_name = $n["username"]; 
        $photo1 = $n["photo1"];
        
        } 
        
        echo '<br /><table width="80%" bordercolor="black" border="1" cellspacing="0" cellpadding="2">
              <tr>
              <td bgcolor="#E2E2E2" width="10%"><p>Posted By:<img src=\'uploads/'.$photo1.' border=\'0\' /></td><td bgcolor="#E2E2E2" width="50%"><p>(<a href="profile.php?id='.$row2[uid].'">'.$mem_name.'</a>) On ('.$row2[posted].')</td>
              <tr>
              <td bgcolor="#E2E2E2" width="10%"><p>Comments:</td><td rowspan="2" bgcolor="#FAF8CC" width="50%"><p>'.$row2[comments].'</td>
              <tr rowspan="2">
              <td bgcolor="#E2E2E2" width="10%"><p>Post ID: '.$row2[id].'</td>
              </tr>
              </table>';                  
        } 

 

can anyone see any errors?

 

cheers

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/50916-solved-photo-not-echoing-out/
Share on other sites

echo '<br /><table width="80%" bordercolor="black" border="1" cellspacing="0" cellpadding="2">

              <tr>

              <td bgcolor="#E2E2E2" width="10%"><p>Posted By:<img src='uploads/".$photo1."' border=\'0\' /></td><td bgcolor="#E2E2E2" width="50%"><p>(<

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.