PHP error- Cannot modify header information - headers already sent

This error occurs when your script tries to send an HTTP header to the client when it already occurs once.
This is a warning and is visible when you turn on the extended error messages within your PHP files. This can be done in the following way.

A good example is not starting with a session call at the beginning of the page, for instance like this:
session_start(); ?>
My Page The session should then


be called





on the



first

line.
If you have applied this and you still get the same result then you can check that at the top of the page there are no hidden characters or lines. After that this will work.

For more information you can look at the site of PHP. https://php.net/Keywords:

Warning: Cannot modify header information - headers already sent E_WARNING error in php