Jump to content

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>(<

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.