title: Creating dynamic folder and its thumbnail using php
body: <p>I am creating a folder dynamically, and I want to show the thumbnail of the folder as well.</p>
  
  <p>Here is my index.php:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /&gt;
  &lt;title&gt;Untitled Document&lt;/title&gt;
  &lt;/head&gt;
  
  &lt;body&gt;
  &lt;div id="pictures"&gt;
  &lt;form id="pic_form" method="post" action="pictures.php"&gt;
  &lt;table align="center" width="500" cellpadding="0" cellspacing="0" border="0"&gt;
     &lt;tr&gt;
     &lt;td width="50px" align="center"/&gt;
     &lt;td width="100px" align="center"&gt;Folder Name::
     &lt;td&gt;
     &lt;td width="50px" align="center"/&gt;
     &lt;td width="100px" align="center"&gt;
     &lt;input type="text" id="foldername" name="foldername"&gt;
     &lt;td&gt;
     &lt;td width="50px" align="center"/&gt;
     &lt;td width="100px" align="center"&gt;
     &lt;input type="submit" name="submit" value="Create"&gt;
     &lt;td&gt;
     &lt;td width="50px" align="center"/&gt;
     &lt;/tr&gt;
  &lt;/table&gt;
  &lt;/form&gt;
  &lt;/div&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Now here is my pictures.php:</p>
  
  <pre><code>&lt;?php
  $foldername=$_POST['foldername'];
  mkdir("album/$foldername");
  //now what to do to generate thumbnail of the folder in the body segment;
  //my concept ends here;
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;/head&gt;
  &lt;body&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>