title: How to set $_SESSION variable when click on a div
body: <p>In my portfolio I implemented a PHP script that generate some div that contain images of some works.
  When users click on a div, there is a redirect on a details.php page that contains work details. How can I set $_SESSION variable values, in order to use them on details.php?</p>
  
  <p>PHP scipt:</p>
  
  <pre><code>$query2="SELECT * FROM Posts WHERE Category='".$record1['Category']."' ORDER BY data_pubb DESC";
              $esito2 = mysql_query($query2);
              while($record2 = mysql_fetch_array($esito2))
              {
                  echo "
                      &lt;div class='col-sm-4 job'&gt;
                          &lt;div class='container hover-image-container'&gt;
                              &lt;a href=''&gt;
                                  &lt;img src='".$record2['static_img']."' data-src='".$record2['static_img']."' data-animated-src='".$record2['dinamic_img']."' width='100%' height='100%' /&gt;
                                  &lt;div class='overlay'&gt;
                                      &lt;div class='text'&gt;".$record2['title']."&lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/a&gt;
                          &lt;/div&gt;
                      &lt;/div&gt;
                          ";
              }
  </code></pre>