Jump to content

[SOLVED] help with display more picture


chanfuterboy

Recommended Posts

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

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>";
}

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.