title: Displaying BLOB image from Mysql database into dynamic div in html
body: <p>I have a BLOB image that is stored when the user submits an advert form, they have the choice of uploading one image. The image is stored in the database with the other information.</p>
  
  <p>Every time my page loads it dynamically creates the advert divs and also fills in the matching information from my database into the div. </p>
  
  <p>The problem I have is displaying all the information including the image together at the same time so when the user clicks to view the page they see each div with a different picture and information. I've seen the other posts on how to display the image but I doubt its the same method when you're displaying several images from the same database.</p>
  
  <p>My database is set up as follows:</p>
  
  <p>ID
  ADTITLE
  EMAIL
  PRICE
  DESCRIPTION
  CATEGORY
  <strong>name
  type
  size
  content</strong>
  DATE</p>
  
  <p>The bold variables are for the image/blob</p>
  
  <p>Here is my code where I retrieve the information :</p>
  
  <pre><code>$Category = 'Specials'; 
  $query = $pdo-&gt;prepare("SELECT * FROM adsubm WHERE CATEGORY LIKE '%$Category%' ORDER BY DATE DESC" );
  $query-&gt;execute();
  
  while($row = $query-&gt;fetch()) {
      $Adtitle=$row['ADTITLE'];
      $Desc=$row['DESCRIPTION'];
      $Price=$row['PRICE'];
      $Date=$row['DATE'];
      $timestamp=strtotime($Date);
      $Day= date("d",$timestamp);
      $Month=date("F",$timestamp);
      $Newmonth=date('M', strtotime($Month . '01'));
      $Year=date("Y",$timestamp);
      header('Content-type: image/jpeg');
      $Image=$row['content'];
  
  
  echo  " 
             &lt;div class='[ col-xs-12 col-sm-offset-2 col-sm-8 ]' style='margin-top: 10px'&gt;
                  &lt;ul class='event-list'&gt;
                      &lt;li&gt;
                          &lt;time datetime='$Date'&gt;
                              &lt;span class='day'&gt;$Day&lt;/span&gt;
                              &lt;span class='month'&gt;$Newmonth&lt;/span&gt;
                              &lt;span class='year'&gt;$Year&lt;/span&gt;
                              &lt;span class='time'&gt;ALL DAY&lt;/span&gt;
                          &lt;/time&gt;
                          &lt;img alt='#' src='$Image/&gt;
                          &lt;div class='info'&gt;
                              &lt;h2 class='title'&gt;$Adtitle&lt;/h2&gt;
                              &lt;p class='desc'&gt;$Desc&lt;/p&gt;
                                                          &lt;ul&gt;
                                  &lt;li style='width:50%;'&gt;&lt;span class='fa fa-money'&gt;&lt;/span&gt;  $Price&lt;/li&gt;
                              &lt;/ul&gt;
                          &lt;/div&gt;
  
                      &lt;/li&gt;
                                &lt;/ul&gt;
                      &lt;/div&gt;
          ";
  </code></pre>
  
  <p>My php skills are still beginner levels as well. I'm just trying to keep things as plain and simple as possible, i'll look into other methods abit later.</p>
  
  <p>All help is appreciated.
  Thanks</p>