3
and you are questioning the need for such code?
$op is a variable used to control which action (or operation) the page is currently handling.
$op = 'register'; //row 118
This line sets the default value for $op (in case the page is requested without an $op variable set.
foreach ( $_POST as $k => $v ) {
$$k = $v;
}
This section retrives every variable submitted in the POST page request and creates a local variable for it. 'op' can be (and usually is) defined in the POST request and if it is, its value is assigned to the local variable $op. Now $op variable is looked at, and the proper requested action is run.