title: html form button carrying array element as string
body: <p>I want to be able to carry <code>$_POST['v']</code> (string) to delete.php using an HTML form button.</p>
  
  <pre><code>$directory = "exports/";
  $contents = scandir($directory,1);
  foreach($contents as $k =&gt; $v) {
  if ($v != '.' &amp;&amp; $v != '..') { 
    echo "&lt;a href=\"$directory" . $v . "\"&gt;".$v."&lt;/a&gt;";
    echo "&lt;form action=\"delete.php\" method=\"post\"&gt;&lt;a class=\"buttonnohover\"&gt;&lt;input type=\"submit\" class=\"button\" name=\"v\" value=\"Delete\" /&gt;&lt;/form&gt;  &lt;br&gt;";
    }
  }
  </code></pre>
  
  <p>At the moment the submit button simply brings back string(6) "Delete". I want $_POST['v'] to equal each individual $v (filename within the directory) carried on each button. </p>
  
  <p>What am I not doing right?</p>