most likely an error is occuring to prevent the redirect.
to turn error reporting on, add the following code at line 1:
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:
see this thread for details: