title: php $POST dynamic variable names security concerns
body: <p>I am thinking of making a loop to gather all my $_POST variables and assign them to dynamically named variables.Something like this (not tested)</p>
  
  <pre><code> for($i; $i &lt;= $_POST[].length; $i++){
    ${$_POST[i]} = $_POST[i]
    }
  </code></pre>
  
  <p>But I am wondering about the security of something like this. This would then create a variable in the system for every bit of post data sent to the page. Can that variable be damaging even if the script I write doesn't reference it? Is this the type of thing I should avoid entirely? I have some pages that send quite a few variables and a script like this would prevent a whole lot of writing, but is it safe enough?</p>