title: load images dynamically in php from mysql database into a jquery slider
body: <p>I have written a web application that involves having users upload pictures to the site. On the homepage, I dynamically show the newest pictures/items uploaded in PHP, limiting it to ten. However, the page looks so static and I have searched on Google, bing, ask, yahoo, etc for days now and haven't had any answers. </p>
  
  <p>I have written the code to store store the images, and get them from the db.
  The images are shown on the homepage, and the only thing i have left to do is load it in a slider.</p>
  
  <pre><code>$sql = mysql_query("SELECT * FROM items ORDER BY item_date_added DESC LIMIT 10")or die(mysql_error());
  while($row = mysql_fetch_array($sql)) {
      //$user_id = $row['user_id'];
      $item_name = $row['item_name'];
      $item_id = $row['item_id'];
  
      $check_pic = "users/$item_name.jpg";
  
      if (file_exists($check_pic)) {
          $show_pic = "&lt;img src=\"users/$item_name.jpg\" width=\"100px\" height=\"100px\" border=\"5\" id='img'/&gt;";
  
          //$user_pic3 = "&lt;img src=\"users/$rid/image01.jpg\" width=\"50px\" height=\"50px\" border=\"1\" /&gt;";
          //$MemberDisplayList .= '&lt;a href="profile2/index.php?id=' . $rid . '"&gt;' . $user_pic3 . '&lt;/a&gt;';
          $i++;
          $show_new_items .= "&lt;a href='item_view?item_id=$item_id&amp;&amp;session_item=$item_id'&gt;$show_pic&lt;/a&gt;";
      }
      $newly_listed_names .= " &lt;a href='item_view?item_id=$item_id&amp;&amp;session_item=$item_id'&gt; $item_name &lt;/a&gt; | ";
  }
  </code></pre>
  
  <p>///////// END  SHOW NEWLY ADDED ITEMS ///////////////////////////////////////////////////</p>
  
  <p>the newly added items in echoed in a div in the body.</p>
  
  <p>Can anyone help me please! it's been bothering me for a while now. Thanks.</p>