title: create folder according to input field in php
body: <p>in my code project, I am trying to name a folder using an input field(what you type in input field becomes the folders name)so far, I have tried using js variables in <code>&lt;?php mkdir("test"); ?&gt;</code>but it dosent work any suggestions?
  this is what I have so far:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?php
     $foldername = ["folder"];
     $structure = 'communities/'.$foldername;
  
     if (!mkdir($structure, 0777, true)) {
        die('Failed to create folders...');
     }
  ?&gt;
  &lt;form method="post" action=""&gt;
  &lt;input type="text" name="folder"&gt;
   &lt;input type="submit" value="create"&gt;
  &lt;/form&gt;</code></pre>
  </div>
  </div>
  </p>