Cannot modify header information - headers already sent
Output started before header() or a redirect. Move the redirect above any echo, and close the file without a trailing gap.
Solutions
The message, why it happens, and the corrected code. Three opening solutions.
Output started before header() or a redirect. Move the redirect above any echo, and close the file without a trailing gap.