title: Edit option visible only to the user who uploaded in php
body: <p>Basically I want to add an edit option and that edit option should be visible only to the person who uploaded (just like in Facebook where edit option is visible only to that person who uploaded the story) the content, here content is uploaded by a php file (upload.php) and displayed in a masonry layout,what could be the possible solutions to it?Though i can provide user with a edit link on upload.php file  and with the help of id's assigned to each grid-item i can edit.But providing edit link on the grid itself (visible only to the person who uploaded it) would be a better idea.</p>
  
  <pre><code>  echo "&lt;div class='mainlayout' data-js-module='layout'&gt;";
                  echo "&lt;div class='grid' style='position: relative;'&gt;";
                    include "mysql.php";
                    $query= "SELECT ID,Title,Summary,Content,ImgName,Image FROM content ORDER BY ID DESC";
                    $result=mysql_query($query,$db);
   while($row=mysql_fetch_array($result))
                      {  
  echo "&lt;div class='grid-item item1' style='position: relative; left: 240px; top: 0px; background: ".ran_col().";'&gt;";           
   echo"&lt;div class='show-image'&gt;";
                          echo '&lt;img class="image" src="data:image;base64,'.$row['Image'].' " height="240" width="210" style="border: 5px; border-radius: 5px; float:left; position:relative;"/&gt;'; echo"&lt;/div class='show-image'&gt;"; 
  echo "&lt;div class='content-short' style='position:relative;'&gt;";
  
                              $string = $row['Content'];
                              if (strlen($string) &gt; 200) 
                              {
                                $trimstring = substr($string, 0,200). '...';
                              } 
                              else 
                              {
                                $trimstring = substr($string,0). '...';
                              }
                              echo $trimstring;
                              $id= $row['ID'];
                          echo "&lt;/div&gt;";
  
                          echo "&lt;div class='content-full'&gt;";
                            echo $row['Content'];
    echo "&lt;/div&gt;";
  echo '&lt;script type="text/javascript"&gt;$(".content-full").hide();&lt;/script&gt;';
          echo "&lt;/div&gt;";
                      }
                    mysql_close($db); 
                  echo "&lt;/div&gt;";
                echo "&lt;/div&gt;";  
  </code></pre>