most likely an error is occuring to prevent the redirect.
to turn error reporting on, add the following code at line 1:
<?php
error_reporting(E_ALL);
ini_set('display_errors','on');
?>
once we know what the error is, we will be able to troubleshoot the cause.
most likely the error is the Headers already sent error which can be caused by a space at the end of a closing php tag:
?> "
or a blank line between the closing php and an opening php tag:
?>
<?php
see this thread for details:
showthread.php?t=19285