graham23s Posted May 11, 2007 Share Posted May 11, 2007 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 Quote Link to comment https://forums.phpfreaks.com/topic/50916-solved-photo-not-echoing-out/ Share on other sites More sharing options...
taith Posted May 11, 2007 Share Posted May 11, 2007 when you check the output'd source code... what do you get for that url? for the img... Quote Link to comment https://forums.phpfreaks.com/topic/50916-solved-photo-not-echoing-out/#findComment-250413 Share on other sites More sharing options...
jitesh Posted May 11, 2007 Share Posted May 11, 2007 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>(< Quote Link to comment https://forums.phpfreaks.com/topic/50916-solved-photo-not-echoing-out/#findComment-250418 Share on other sites More sharing options...
graham23s Posted May 11, 2007 Author Share Posted May 11, 2007 solved guys thanks i never ended the img src tag. Graham Quote Link to comment https://forums.phpfreaks.com/topic/50916-solved-photo-not-echoing-out/#findComment-250467 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.