Re-addressing error in PHP

1

What happens is that I try to redirect to another page but I get this error:

  

Warning: Can not modify header information - headers already sent

The line that generates it tells me what it is:

 header("location: " . URL . "Home/newProcess");

I put the functions of ob_start() to send the headers anywhere in the document, but it keeps appearing.

    
asked by Esteban Calle 30.07.2018 в 23:05
source

1 answer

0

You are doing an output (printing the html on the screen, any output) before this instruction.

You have to do the validations that these redirects do before any HTML output.

    
answered by 30.07.2018 в 23:08