my guess is that a php error is occuring causing the redirect to fail.
add the following code at line 1 to turn error reporting on:
i suspect that this line is causing the error:
<?PHP session_start() ?>
there should be a semi colon at the end:
<?PHP session_start(); ?>