title: Array of forms in PHP
body: <p>First, thanks for taking a look at this. I am trying to create an array of forms that acts as a dynamically sized results list. From the results that were given the user can click 'detail' (a submit button) to get further information on the result which is why I am attempting to create an array of forms. Here is what I had tried, which compiled but the buttons aren't doing anything. Any help would be great :)</p>
  
  <pre><code>&lt;?php
      session_start();
  ?&gt;
  
  &lt;html&gt;
      &lt;head&gt;
      &lt;/head&gt;
      &lt;body&gt;
  &lt;?PHP
  
  $numbers=array(1,2,3,4,5);
  $listsize=count($numbers);
  
  
  
  for($currentnum=0;$currentnum &lt;$listsize;$currentnum ++){
  ?&gt;
          &lt;form action="&lt;?php echo $_SERVER['PHP_SELF']?&gt;" method="post"&gt;
  
          &lt;input type="button" value="Submit" name="button&lt;?PHP echo $currentnum?&gt;" /&gt;
  
          &lt;/form&gt;
          &lt;?PHP
          echo "&lt;br/&gt;";
      }
  if(isset($_POST['button'.$currentnum])){
  echo "You choose ".$currentnum;
  }    
  ?&gt;
     &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>This is really just meant to demonstrate what I am trying to do (thought that would be easier without functions out of scope of question).</p>