I am writing a php-code which redirect me from localhost/login.php to localhost/index.page.
I tried using the header('Location: index.php)
method, but i keep receiving an error
Warning: Cannot modify header information - headers already sent by...
The error according to my search is due to a sort of output which is sent before the header()
function. Unfortunately, after trying for hours, I could not figure out what is wrong with the code, so I am now looking for an alternative method.
Just another method, to redirect me from my "localhost/login.php" page back to my home page "localhost/index.php".