Is using extract($_POST) insecure? If yes then what can I do about this?
extract($_POST)
It is always better simply read values from $_POSTand do something with them instead of just exposing them as variables and risking overriding some of yours...
$_POST