title: prevent html form fields from posting
body: <p>Since I can't find this on SO or the Web in general, I'll post it here to see if we can't add to the community's collective knowledge.</p>
  
  <p>I have a legacy <code>php</code>/<code>html</code> form which contains elements that are submitted via <code>AJAX</code> and some elements that are submitted via $_POSTing the form back to itself: <code>&lt;form action="thesamepage.php" method="post"&gt;</code></p>
  
  <p>Right now, I am excluding the AJAX-handled fields when I <em>process</em> the $_POSTed values (i.e. after I receive them from <code>POST</code>). I suppress their validation/sanitization , because they are simply not used. (In this case, abstinence <em>is</em> the best form of control.)</p>
  
  <p>However, what I am wondering is this:</p>
  
  <p><strong>Is there a way to prevent certain – but not all – fields from being passed with the <code>$_POST</code> form data at all?</strong></p>
  
  <p>Again, I want the non-AJAX form fields to <code>submit</code>, but not the AJAX-handled fields.</p>
  
  <p>I think that it would be a data security plus, if we could prevent unnecessary data – even field names – from being POSTed. Not to mention efficiency.</p>
  
  <p>Thoughts?</p>