ecabrera Posted August 24, 2011 Share Posted August 24, 2011 the image in my comments box wont show up it gives me an error Notice: Undefined index: avatar in /home/ecabrera/public_html/profile.php on line 277 and i dont whats wrong with it // display comments $perpage = 10; $start=0; if(@$_GET['s']) $start = $_GET['s']; $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' ORDER BY id DESC LIMIT $start, $perpage"); $numrows = mysql_num_rows($query); if ($numrows > 0){ $next = $start + $perpage; $prev = $start - $perpage; while($row = mysql_fetch_assoc($query)){ $user_id = $row['user_id']; $user_name = $row['user_name']; $comment = nl2br($row['comment']); $date = $row['date']; $avatar = $row['avatar']; echo "<img src='avatars/$avatar'></img><a href='$site/profile?id=$getid'></a> <b> on $date</b><br />"; echo "<div style='margin-left: 10px;'>$comment</div><hr>"; } } else echo "This user has no profile comments.<br />"; // end diplay comment area Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/ Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 help anyone Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261217 Share on other sites More sharing options...
voip03 Posted August 24, 2011 Share Posted August 24, 2011 $_POST['s'] isn't set. Try doing if(isset($_POST['s'])) { .... } Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261219 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 i tried that and the img doesnt show up a just a some icon with a broken page Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261220 Share on other sites More sharing options...
voip03 Posted August 24, 2011 Share Posted August 24, 2011 what is the code in 277 Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261222 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 $avatar = $row['avatar']; Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261223 Share on other sites More sharing options...
voip03 Posted August 24, 2011 Share Posted August 24, 2011 check db field name Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261224 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 here the whole code it has notihn to do with the db <?php $getid=""; if(@$_GET['id']) $getid = $_GET['id']; if ($getid){ require('scripts/connect.php'); $query = mysql_query("SELECT * FROM users WHERE id='$getid'"); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $firstname = $row['first_name']; $user = $row['username']; $bio = $row['bio']; $youtube = $row['youtube']; $title = "$firstname's Profile"; $meta_description = "$bio"; $meta_keywords = "$youtube"; } else $title = "Opps!! Profile not found!"; mysql_close(); } else $title = "Profiles"; ?> <?php require("styles/top.php"); ?> <div id='full'> <?php $msg=""; if (!$getid) $getid = "1"; require('scripts/connect.php'); $query = mysql_query("SELECT * FROM users WHERE id='$getid'"); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $id = $row['id']; $firstname = $row['first_name']; $lastname = $row['last_name']; $user = $row['username']; $email = $row['email']; $avatar = $row['avatar']; $bio = nl2br($row['bio']); $sex = $row['sex']; $status = $row['status']; $education = $row['education']; $music = $row['music']; $movies = $row['movies']; $tv = $row['tv']; $youtube = $row['youtube']; $lastlogin = $row['last_login']; $active = $row['active']; $locked = $row['locked']; $date = $row['date']; if ($locked == 0){ echo "<div id='profile'> <div id='leftside'> <img src='avatars/$avatar' width='200px' height='200px' style='border: 2px double #b1d0f0;'></img><table bordercolor='#b1d0f0' width='125' height='10' align='right' border='0'><tr><td><br/>$firstname <br />$sex <br />$status<br /> <br />Last Login: $lastlogin <br /> </tr> </table> <a href='#' id='MessageLink' rel='Message'><img src='images/message.gif' border='0' align='middle' /> <a href='#' id='AddFriendLink' rel='addtofriends'><img src='images/friend.gif' border='0' align='middle' /></a> <br><br /> <table id='Table1' bordercolor='#b1d0f0' cellspacing='0' cellpadding='0' width='300' bgcolor='#ffffff' border='1' class='interestsAndDetails'> <tbody><tr> <td class='text tdborder' valign='middle' align='left' width='300' bgcolor='#b1d0f0' wrap='' style='WORD-WRAP:break-word'> <FONT COLOR='black'><b>$firstname's Interests</b></FONT></td> </tr> <tr valign='top'> <td class='tdborder'> <table id='Table2' bordercolor='#000000' cellspacing='3' cellpadding='3' width='330' align='left' bgcolor='#b1d0f0' border='0'> <tbody> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>Movies:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> $movies </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>TV:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> $tv </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>Idk:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> Idk yeat </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>IdK:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> g </td> </tr> </tbody></table> </td> </tr> </tbody></table> </div> <div id='rightside'> <div> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div class='top'>$firstname's Profile</div> </div> <div class='bottom'> <b>Name</b> - $firstname $lastname<br /> <b>Gender</b> - $sex<br /> <b>Status</b> - $status<br /> <b>Education</b> - $education<br /> <b>Joined</b> - $date<br /> <b>Last Login</b> -$lastlogin<br />"; if ($youtube) echo "<br /><b>Youtube Channel:</b><br /> <a href='http://www.youtube.com/$youtube'>$youtube</a><br />"; if ($bio) echo "<br /><b>About Me:</b><br/>$bio<br/>"; echo "</div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; /* if ($youtube) echo "<script src='http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=$youtube&synd=open&w=275&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js'></script>"; */ /*ad will appear*/ echo "<table><tr><td><script type='text/javascript'> ch_client = 'ffrgrges'; ch_width = 448; ch_height = 100; ch_type = 'mpu'; ch_sid = 'gfrhg Default'; ch_backfill = 1; ch_color_site_link = '#0000CC'; ch_color_title = '#0000CC'; ch_color_border = 'transparent'; ch_color_text = '#000000'; ch_color_bg = 'transparent'; </script> <script src='http://scripts.chitika.net/eminimalls/amm.js' type='text/javascript'> </script></td></tr></table>"; /*music player*/ if ($music) echo "<table height=100px width=590px border='0'<tr> <td><b>Music Player:</b><br/>$music<br/></td> </tr> </table>"; echo "<a name='comments'></a><div style='margin-top: 15px;'> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div class='top'>$firstname's Profile Comments</div> </div> <div class='bottom'>"; // comment button action if (@$_POST['commentbtn']){ if ($username){ $comment = $_POST['comment']; if(!empty($comment)){ $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' AND user_id='$userid' AND comment='$comment'"); $numerows = mysql_num_rows($query); if ($numrows != 0){ $commdate = date("F d, Y"); // October 08, 2010 mysql_query("INSERT INTO profile_comments VALUES ('', '$getid', '$userid', '$username', '$comment', '$commdate')"); // email profile owner $webmaster = "[email protected]"; $headers = "From: Wenstie<$webmaster>"; $subject = "$username has commented on your profile"; $message = "Hello $firstname $lastname. $username has posted a comment on your profile on webiste.com"; $message .= " The message $username has posted with is below.\n"; $message .= "\n****************************************************************\n"; $message .= "$comment"; $message .= "\n\n****************************************************************\n\n"; $message .= "Click here to view $username's profile $site/profile?id=$userid\n"; $message .= "Click here to view your profile $site/profile?id=$getid\n"; // send email mail($email, $subject, $message, $headers); $msg = "Your comment has been added and is shown above."; } else $msg = "You can not submit the same comment twice."; } else $msg = "You did not supply a comment."; } else $msg = "You must be logged in to comment on profiles."; } // display comments $perpage = 10; $start=0; if(@$_GET['s']) $start = $_GET['s']; $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' ORDER BY id DESC LIMIT $start, $perpage"); $numrows = mysql_num_rows($query); if ($numrows > 0){ $next = $start + $perpage; $prev = $start - $perpage; while($row = mysql_fetch_assoc($query)){ $user_id = $row['user_id']; $user_name = $row['user_name']; $comment = nl2br($row['comment']); $date = $row['date']; echo "<b>Posted by <a href='$site/profile?id=$user_id'>$user_name</a> on $date</b><br />"; echo "<div style='margin-left: 10px;'>$comment</div><hr>"; } } else echo "This user has no profile comments.<br />"; // end diplay comment area // show comment nav echo "<div style='float: right;'>"; if (!($start <= 0)) echo "<a href='$site/profile?id=$getid&s=$prev#comments'>Previous</a>"; if (!($start > $numrows - $perpage)) echo "<a href='$site/profile?id=$getid&s=$next#comments'>Next</a>"; echo "</div>"; if ($username){ // display comment form echo "<a name='comment-form'></a>"; if ($msg) echo "<b>$msg</b><br />"; echo "<form action='$site/profile?id=$getid#comment-form' method='post'> <table> <tr> <td><textarea name='comment' style='width: 400px; height: 75px;'></textarea></td> </tr> <tr> <td><input type='submit' name='commentbtn' value='Comment'></td> </tr> </table> </form>"; } // end comment box echo "</div></div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; // end right column echo "</div>"; } else echo "<font color='red'><center><h1>The profile you have selected is currently locked.</h1></center></font>"; } else echo "No user was found."; ?> </div> <div id='left'> </div> <div id='right'> </div> <?php require("styles/bottom.php"); ?> Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261227 Share on other sites More sharing options...
voip03 Posted August 24, 2011 Share Posted August 24, 2011 check 'avatar' name in the code& db Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261228 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 sorry wrong script this is the one and everything is in its place <?php $getid=""; if(@$_GET['id']) $getid = $_GET['id']; if ($getid){ require('scripts/connect.php'); $query = mysql_query("SELECT * FROM users WHERE id='$getid'"); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $firstname = $row['first_name']; $user = $row['username']; $bio = $row['bio']; $youtube = $row['youtube']; $title = "$firstname's Profile"; $meta_description = "$bio"; $meta_keywords = "$youtube"; } else $title = "Opps!! Profile not found!"; mysql_close(); } else $title = "Profiles"; ?> <?php require("styles/top.php"); ?> <div id='full'> <?php $msg=""; if (!$getid) $getid = "1"; require('scripts/connect.php'); $query = mysql_query("SELECT * FROM users WHERE id='$getid'"); $numrows = mysql_num_rows($query); if ($numrows == 1){ $row = mysql_fetch_assoc($query); $id = $row['id']; $firstname = $row['first_name']; $lastname = $row['last_name']; $user = $row['username']; $email = $row['email']; $avatar = $row['avatar']; $bio = nl2br($row['bio']); $sex = $row['sex']; $status = $row['status']; $education = $row['education']; $music = $row['music']; $movies = $row['movies']; $tv = $row['tv']; $youtube = $row['youtube']; $lastlogin = $row['last_login']; $active = $row['active']; $locked = $row['locked']; $date = $row['date']; if ($locked == 0){ echo "<div id='profile'> <div id='leftside'> <img src='avatars/$avatar' width='200px' height='200px' style='border: 2px double #b1d0f0;'></img><table bordercolor='#b1d0f0' width='125' height='10' align='right' border='0'><tr><td><br/>$firstname <br />$sex <br />$status<br /> <br />Last Login: $lastlogin <br /> </tr> </table> <a href='#' id='MessageLink' rel='Message'><img src='images/message.gif' border='0' align='middle' /> <a href='#' id='AddFriendLink' rel='addtofriends'><img src='images/friend.gif' border='0' align='middle' /></a> <br><br /> <table id='Table1' bordercolor='#b1d0f0' cellspacing='0' cellpadding='0' width='300' bgcolor='#ffffff' border='1' class='interestsAndDetails'> <tbody><tr> <td class='text tdborder' valign='middle' align='left' width='300' bgcolor='#b1d0f0' wrap='' style='WORD-WRAP:break-word'> <FONT COLOR='black'><b>$firstname's Interests</b></FONT></td> </tr> <tr valign='top'> <td class='tdborder'> <table id='Table2' bordercolor='#000000' cellspacing='3' cellpadding='3' width='330' align='left' bgcolor='#b1d0f0' border='0'> <tbody> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>Movies:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> $movies </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>TV:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> $tv </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>Idk:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> Idk yeat </td> </tr> <tr> <td valign='top' align='left' width='30' bgcolor='#d5e8fb'><span class='lightbluetext8'>IdK:</span> </td> <td width='175' bgcolor='#d5e8fb' style='WORD-WRAP: break-word'> g </td> </tr> </tbody></table> </td> </tr> </tbody></table> </div> <div id='rightside'> <div> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div class='top'>$firstname's Profile</div> </div> <div class='bottom'> <b>Name</b> - $firstname $lastname<br /> <b>Gender</b> - $sex<br /> <b>Status</b> - $status<br /> <b>Education</b> - $education<br /> <b>Joined</b> - $date<br /> <b>Last Login</b> -$lastlogin<br />"; if ($youtube) echo "<br /><b>Youtube Channel:</b><br /> <a href='http://www.youtube.com/$youtube'>$youtube</a><br />"; if ($bio) echo "<br /><b>About Me:</b><br/>$bio<br/>"; echo "</div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; /* if ($youtube) echo "<script src='http://www.gmodules.com/ig/ifr?url=http://www.google.com/ig/modules/youtube.xml&up_channel=$youtube&synd=open&w=275&h=390&title=&border=%23ffffff%7C3px%2C1px+solid+%23999999&output=js'></script>"; */ /*ad will appear*/ echo "<table><tr><td><script type='text/javascript'> ch_client = 'jhhj'; ch_width = 448; ch_height = 100; ch_type = 'mpu'; ch_sid = 'Chitika Default'; ch_backfill = 1; ch_color_site_link = '#0000CC'; ch_color_title = '#0000CC'; ch_color_border = 'transparent'; ch_color_text = '#000000'; ch_color_bg = 'transparent'; </script> <script src='http://scripts.chitika.net/eminimalls/amm.js' type='text/javascript'> </script></td></tr></table>"; /*music player*/ if ($music) echo "<table height=100px width=590px border='0'<tr> <td><b>Music Player:</b><br/>$music<br/></td> </tr> </table>"; echo "<a name='comments'></a><div style='margin-top: 15px;'> <b class='corners'> <b class='corners1'><b></b></b> <b class='corners2'><b></b></b> <b class='corners3'></b> <b class='corners4'></b> <b class='corners5'></b></b> <div class='cornersfg'> <div class='top'>$firstname's Profile Comments</div> </div> <div class='bottom'>"; // comment button action if (@$_POST['commentbtn']){ if ($username){ $comment = $_POST['comment']; if(!empty($comment)){ $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' AND user_id='$userid' AND comment='$comment'"); $numerows = mysql_num_rows($query); if ($numrows != 0){ $commdate = date("F d, Y"); // October 08, 2010 mysql_query("INSERT INTO profile_comments VALUES ('', '$getid', '$userid', '$username', '$comment', '$commdate')"); // email profile owner $webmaster = "[email protected]"; $headers = "From:jjj<$webmaster>"; $subject = "$username has commented on your profile"; $message = "Hello $firstname $lastname. $username has posted a comment on your profile on hhhhh.com"; $message .= " The message $username has posted with is below.\n"; $message .= "\n****************************************************************\n"; $message .= "$comment"; $message .= "\n\n****************************************************************\n\n"; $message .= "Click here to view $username's profile $site/profile?id=$userid\n"; $message .= "Click here to view your profile $site/profile?id=$getid\n"; // send email mail($email, $subject, $message, $headers); $msg = "Your comment has been added and is shown above."; } else $msg = "You can not submit the same comment twice."; } else $msg = "You did not supply a comment."; } else $msg = "You must be logged in to comment on profiles."; } // display comments $perpage = 10; $start=0; if(@$_GET['s']) $start = $_GET['s']; $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' ORDER BY id DESC LIMIT $start, $perpage"); $numrows = mysql_num_rows($query); if ($numrows > 0){ $next = $start + $perpage; $prev = $start - $perpage; while($row = mysql_fetch_assoc($query)){ $user_id = $row['user_id']; $user_name = $row['user_name']; $comment = nl2br($row['comment']); $date = $row['date']; $avatar = $row['avatar']; echo "<img src='avatars/$avatar'></img><a href='$site/profile?id=$getid'></a> <b> on $date</b><br />"; echo "<div style='margin-left: 10px;'>$comment</div><hr>"; } } else echo "This user has no profile comments.<br />"; // end diplay comment area // show comment nav echo "<div style='float: right;'>"; if (!($start <= 0)) echo "<a href='$site/profile?id=$getid&s=$prev#comments'>Previous</a>"; if (!($start > $numrows - $perpage)) echo "<a href='$site/profile?id=$getid&s=$next#comments'>Next</a>"; echo "</div>"; if ($username){ // display comment form echo "<a name='comment-form'></a>"; if ($msg) echo "<b>$msg</b><br />"; echo "<form action='$site/profile?id=$getid#comment-form' method='post'> <table> <tr> <td><textarea name='comment' style='width: 400px; height: 75px;'></textarea></td> </tr> <tr> <td><input type='submit' name='commentbtn' value='Comment'></td> </tr> </table> </form>"; } // end comment box echo "</div></div> <b class='corners'> <b class='corners5'></b> <b class='corners4'></b> <b class='corners3'></b> <b class='corners2'><b></b></b> <b class='corners1'><b></b></b></b> </div>"; // end right column echo "</div>"; } else echo "<font color='red'><center><h1>The profile you have selected is currently locked.</h1></center></font>"; } else echo "No user was found."; ?> </div> <div id='left'> </div> <div id='right'> </div> <?php require("styles/bottom.php"); ?> Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261231 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 any body? Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261281 Share on other sites More sharing options...
cyberRobot Posted August 24, 2011 Share Posted August 24, 2011 The initial error ("Notice: Undefined index: avatar...") suggests that "avatar" doesn't exist in the database table. You should double check to make sure they match exactly. Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261336 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 It does exists I checked it n I used on the script and that. One shows up but this one does not Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261480 Share on other sites More sharing options...
cyberRobot Posted August 24, 2011 Share Posted August 24, 2011 After line 277, did you try something like: <?php //... $avatar = $row['avatar']; print '(' . $row['avatar'] . ')'; //... ?> Does it display the various avatars filenames as expected? Since you have a while loop, I would imagine that you're dealing with multiple rows. Do some filenames display; while others do not? This might provide a clue to where the image data is being lost... Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261484 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 i tryed that an nothing gives me error Notice: Undefined index: avatar in /home/ecabrera/public_html/profile.php on line 278 i had this on top and it works echo "<div id='profile'> <div id='leftside'> <img src='avatars/$avatar' width='200px' height='200px' style='border: 2px double #b1d0f0;'></img><table bordercolor='#b1d0f0' width='125' height='10' align='right' border='0'> while($row = mysql_fetch_assoc($query)){ $user_id = $row['user_id']; $user_name = $row['user_name']; $comment = nl2br($row['comment']); $date = $row['date']; $avatar = $row['avatar']; echo "<img src='avatars/$avatar'></img><a href='$site/profile?id=$getid'></a> <b> on $date</b><br />"; Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261489 Share on other sites More sharing options...
cyberRobot Posted August 24, 2011 Share Posted August 24, 2011 Ahhh...I think the issue is due to the fact that you're reading the data from two seperate tables: <?php //... $query = mysql_query("SELECT * FROM users WHERE id='$getid'"); //... $query = mysql_query("SELECT * FROM profile_comments WHERE profile_id='$getid' ORDER BY id DESC LIMIT $start, $perpage"); //... ?> "avatar" most likely doesn't exist in the second table. Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261492 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 avatar exsits in the frst table how do i get to show Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261493 Share on other sites More sharing options...
cyberRobot Posted August 24, 2011 Share Posted August 24, 2011 avatar exsits in the frst table how do i get to show Since you already have the avatar saved to it's own variable ($avatar), you just need to remove line 277: $avatar = $row['avatar']; //<-- remove this line Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261494 Share on other sites More sharing options...
ecabrera Posted August 24, 2011 Author Share Posted August 24, 2011 ok thanks i get it Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261496 Share on other sites More sharing options...
cyberRobot Posted August 24, 2011 Share Posted August 24, 2011 ok thanks i get it No problem As a side note, is there a reason you're using a close tag for images? echo "<img src='avatars/$avatar'></img><a href='$site/profile?id=$getid'></a><b> on $date</b><br />"; Unless I'm missing something, the image tag doesn't have a close tag. Since it looks like you're using XHTML, it would be closed as follows: echo "<img src='avatars/$avatar' /><a href='$site/profile?id=$getid'></a><b> on $date</b><br />"; Link to comment https://forums.phpfreaks.com/topic/245560-img-problems/#findComment-1261502 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.