title: How to pass a variable into a file path in PHP
body: <p>I am trying to pass a user entered company into a path to determine the content displayed.  I have the company submitting to the page that the form is on and this as the path for the content display.  I would like to include a mkdir if it is a new company name.</p>
  
  <pre><code>$path = '(uploadedFiles/($_POST['companyName']))';
  $dirs = scandir($path);
  </code></pre>
  
  <p>Not sure why but I am now getting an undefined index error.  Here is the portion that is asking for the name it is on the page named admin.php</p>
  
  <pre><code>print '&lt;form action="admin.php" method="POST"&gt;'.PHP_EOL;
              print' &lt;h4&gt; Enter the name of the company the new uploads belong to.&lt;/h4&gt;';
              print'    &lt;label class="control-label"    `for="companyName"&gt;companyName&lt;/label&gt;';`
              print'      &lt;input type="text" name="" id="companyName" placeholder="Enter Comapny Name "&gt;';
              print'      &lt;button type="submit" class="btn"&gt;Enter&lt;/button&gt;';
              print' &lt;/div&gt;'; 
  </code></pre>