It will definately be best for you to rewrite that script, but as a temporary fix, you could use something like:
foreach ($_REQUEST as $key=>$val) {
$$key = $val;
}
Note that I used $_REQUEST rather than $POST, just to be sure it also includes $GET and $_COOKIE values.