In my previous post i ask how to create variables from an array ( PHP Variables made with foreach ) i got several answers and i was testing extract() but i have seen several against it for security reasons.
Now my question here is how can i use extract in a secure way from a $_POST that has an array that was made using jquery serialized.
With secure i mean that if a user inputs the wrong data, the secure way can take care of that with no problems.
THe PHP Site has a small warning in the extract command the says the following:
Do not use extract() on untrusted data, like user input (i.e. $_GET, $_FILES, etc.). If you do, for example if you want to run old code that relies on register_globals temporarily, make sure you use one of the non-overwriting extract_type values such as EXTR_SKIP and be aware that you should extract in the same order that's defined in variables_order within the php.ini.
It warns about the use but does not provide an example at least of how to solve the user of extract in a secure way.