title: Convert all POST variables to htmlspecialchars
body: <p>In my PHP application, I have lots of places where I get POST data and have to convert it to htmlspecialchars, so I find myself having to specify and convert each element in $_POST individually. Here's an example:</p>
  
  <pre><code>$tusername=htmlspecialchars($_POST['username'], ENT_QUOTES,'UTF-8');
  $tfname=htmlspecialchars($_POST['firstname'], ENT_QUOTES,'UTF-8');
  $tlname=htmlspecialchars($_POST['lastname'], ENT_QUOTES,'UTF-8');
  $temail=htmlspecialchars($_POST['email'], ENT_QUOTES,'UTF-8');
  $tskill=htmlspecialchars($_POST['skillsearchpriv'], ENT_QUOTES,'UTF-8');
  </code></pre>
  
  <p>This can get tedious, especially when you have over +10 $_POST variables for multiple forms.</p>
  
  <p>Is there away of converting all POST variables to htmlspecialchars at once?</p>
  
  <p>Something like <code>$_POST=htmlspecialchars($_POST[allkeys], ENT_QUOTES,'UTF-8');</code>?</p>