title: How to use $_POST
body: <p>I have the following PHP file:</p>
  
  <pre><code>&lt;?php
      echo &lt;&lt;&lt;_END
      &lt;form method='POST' action='index.php' enctpye='multipart/form-data'&gt;
      New Content: &lt;input type='text' name='content'/&gt;&lt;br/&gt;
      New Image: &lt;input type="file" name='image' size='10' /&gt;&lt;br/&gt;
      Products:
          &lt;select name="filename"&gt;
          &lt;option value="product1.txt"&gt;Product 1&lt;/option&gt;
          &lt;option value="product2.txt"&gt;Product 2&lt;/option&gt;
          &lt;option value="product3.txt"&gt;Product 3&lt;/option&gt;
          &lt;/select&gt;
      &lt;/form&gt; 
      _END;
      echo &lt;&lt;&lt;_END
      &lt;input type="submit" value="Upload"/&gt;
      _END;
  
      echo $_POST["filename"];
  ?&gt;
  </code></pre>
  
  <p>I am getting this error when i try to run this.</p>
  
  <pre><code>Notice: Undefined index: filename in `C:\xampp\htdocs\index.php` on line 18
  </code></pre>
  
  <p>Sorry, I am new to PHP but should this not echo either product1.txt, product2.txt or product3.txt?</p>