title: How to popup image in CSS and PHP?
body: <p>I tried to do popup image in the window in CSS and HTML that was successful.
  But I tried to pop up one among images from the database by using PHP it pops up only the first image while I clicked to a different one.</p>
  
  <p>The following is CSS</p>
  
  <pre><code>&lt;style type="text/css"&gt; 
  #check:checked ~ label #cover {
    display: block;
  }
  #cover {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
  }
  #box {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    width: 400px;
    height: 400px;
    border: 10px solid white;
  }
  &lt;/style&gt;
  </code></pre>
  
  <p>And the following is my PHP</p>
  
  <pre><code>&lt;? php
  include("connection.php");
  $que = mysql_query("select picture from pictures");
  while ($row = mysql_fetch_array($que)) {
    $picture = $row['picture'];
    echo '&lt;input type="checkbox" id="check" style="display:none;"&gt;
  &lt;label for="check"&gt;
      &lt;img src="/image/'.$picture.
    '" style="width:50px; height: 50px"/&gt;
      &lt;/label&gt;
  &lt;label for="check"&gt;
      &lt;div id="cover"&gt;
      &lt;div id="box"&gt;
      &lt;img src="/image/'.$picture.
    '" style="width:380px; height: 380px"/&gt;
      &lt;/div&gt;
      &lt;/div&gt;
      &lt;/label&gt;';
  } ?&gt;
  </code></pre>
  
  <p>How can I pop up each image when I click it among many ones from database in PHP?</p>
  
  <p>Please anyone can help me.</p>