chanfuterboy Posted August 8, 2009 Share Posted August 8, 2009 hi, my plan is to display the latest 6 picture that is upload. Somehow i mist something, can some one help me out <?php $picture=$_SESSION['pic']; $query = mysql_query("SELECT * FROM members WHERE username='$username' order by rand() limit 0,6"); echo"$username"; $row = mysql_fetch_assoc($query); $location = $row['picture']; $location1 = $row['articlename']; $location2 = $row['articlecolor']; echo "<img src='images/$location' width='100' height='100'>"; echo "<b> '$location1'.</b>"; echo "<b> '$location2'.</b>"; ?> Link to comment https://forums.phpfreaks.com/topic/169412-solved-help-with-display-more-picture/ Share on other sites More sharing options...
Bjom Posted August 8, 2009 Share Posted August 8, 2009 while ($row = mysql_fetch_assoc($query)) { $location = $row['picture']; $location1 = $row['articlename']; $location2 = $row['articlecolor']; echo "<img src='images/$location' width='100' height='100'>"; echo "<b> '$location1'.</b>"; echo "<b> '$location2'.</b>"; } Link to comment https://forums.phpfreaks.com/topic/169412-solved-help-with-display-more-picture/#findComment-893829 Share on other sites More sharing options...
chanfuterboy Posted August 8, 2009 Author Share Posted August 8, 2009 thanks Link to comment https://forums.phpfreaks.com/topic/169412-solved-help-with-display-more-picture/#findComment-893830 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.