It's wrong or unsafe to use:
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
foreach ($_POST as $key => $value) $$key = $value;
...
}
Let's say I have this code, but use a procedure call with prepare in the variables. Do I have any risk of attack by Sql Injection
?
Being a little more specific, my problem is:
foreach ($ _POST as $ key = > $ value) $$ key = $ value;
I have an analysis and security report on my system saying that this is a serious failure of SQL Injection. Even though I'm using PDO and prepare after that !