title: php form passing extra variable
body: <p>My script displays a list of offers that I can either deny or approve. The problem I am having is sometimes I click deny and the offer is correctly denied but sometimes I click deny and it is incorrectly approved.</p>
  
  <p>Using Live HTTP Headers I've checked the post data being sent when the offer is incorrectly approved and I see</p>
  
  <p>denymes=Not+In+Downline&amp;status=4&amp;status=1</p>
  
  <p>So the problem is that status is being sent twice.</p>
  
  <p>I don't understand what is wrong. Sometimes it works correctly.</p>
  
  <p>The code in question:</p>
  
  <pre><code>$list.="
      &lt;div class=\"borderBox\" id=\"approve_ad_main".$temp[id]."\"&gt;
          &lt;form name=\"deny".$temp[id]."\" action=\"index.php?view=account&amp;ac=myads&amp;adtype=ptsu&amp;id=$temp[id]&amp;action=approve&amp;".$url_variables."\" method=\"post\"&gt;
          &lt;div style=\"border:0px solid #000;padding:5px;\" valign=\"top\" colspan=\"2\"&gt;Add Denied Message : &lt;input type=\"text\" name=\"denymes\" value=\"\" size=\"50\"&gt;&lt;br/&gt;
          &lt;small&gt;This is for displaying a message as to why the ad was denied&lt;br/&gt;
          Leave blank if approving the ads.&lt;/small&gt;&lt;br/&gt;
          &lt;input type=\"hidden\" name=\"status\" value=\"4\"&gt;
          &lt;input type=\"submit\" value=\"Deny\" style=\"width:150px;float:left;\"&gt;
          &lt;/form&gt;
          &lt;form name=\"approve".$temp[id]."\" action=\"index.php?view=account&amp;ac=myads&amp;adtype=ptsu&amp;id=$temp[id]&amp;action=approve&amp;".$url_variables."\" method=\"post\"&gt;
          &lt;input type=\"hidden\" name=\"status\" value=\"1\"&gt;
          &lt;input type=\"submit\" value=\"Approve\" style=\"width:150px;float:left;margin-left:5px;\"&gt;
          &lt;/form&gt;
          &lt;br/&gt;&lt;br/&gt;
  
          &lt;a href=\"$temp[target]\" target=\"_blank\"&gt;$temp[title]&lt;/a&gt;
          &lt;div id=\"approve_ad".$temp[id]."\"&gt;
              Username: $temp[username]&lt;br /&gt;
              &lt;div style=\"height: 150px; overflow: auto; border: 1px solid #c8c8c8; background-color: white; text-align: left; padding: 5 5 5 5px; color: black\"&gt;
                  &lt;b&gt;Userid Used: &lt;/b&gt; $temp[userid]&lt;br /&gt;
                  ".nl2br($temp[welcome_email])."
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  </code></pre>
  
  <p></p>
  
  <hr>
  
  <p>Here's code from view source. Still can't figure out what's wrong.</p>
  
  <pre><code>&lt;div class="borderBox" id="approve_ad_main1000"&gt;
      &lt;form name="deny1000" action="index.php?view=account&amp;ac=myads&amp;adtype=ptsu&amp;id=1000&amp;action=approve&amp;sid=27TWk0MU39VX4YhlU0Tn&amp;sid2=28TYk&amp;siduid=28&amp;" method="post"&gt;
      &lt;div style="border:0px solid #000;padding:5px;" valign="top" colspan="2"&gt;Add Denied Message : &lt;input type="text" name="denymes" value="" size="50" /&gt;&lt;br/&gt;
      &lt;small&gt;This is for displaying a message as to why the ad was denied&lt;br/&gt;
      Leave blank if approving the ads.&lt;/small&gt;&lt;br/&gt;
  
      &lt;input type="hidden" name="status" value="4" /&gt;
      &lt;input type="submit" value="Deny" style="width:150px;float:left;" /&gt;
      &lt;/form&gt;
  
      &lt;form name="approve1000" action="index.php?view=account&amp;ac=myads&amp;adtype=ptsu&amp;id=1000&amp;action=approve&amp;sid=27TWk0MU39VX4YhlU0Tn&amp;sid2=28TYk&amp;siduid=28&amp;" method="post"&gt;
      &lt;input type="hidden" name="status" value="1" /&gt;
      &lt;input type="submit" value="Approve" style="width:150px;float:left;margin-left:5px;" /&gt;
      &lt;/form&gt;
      &lt;br/&gt;&lt;br/&gt;
  
  
      &lt;a href="http://cw.nu/click?aid=9758&amp;linkid=B18917&amp;subid=&amp;subid2=&amp;subid3=&amp;subid4=&amp;subid5=" target="_blank"&gt;Beauty Discount Club - (submit Page &amp;amp; Confirm Email)&lt;/a&gt;
      &lt;div id="approve_ad1000"&gt;
          Username: dan1190&lt;br /&gt;
          &lt;div style="height: 150px; overflow: auto; border: 1px solid #c8c8c8; background-color: white; text-align: left; padding: 5 5 5 5px; color: black"&gt;
              &lt;b&gt;Userid Used: &lt;/b&gt; dan&lt;br /&gt;
  
              dan
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>