Hi,
In addition to the answer by Descalzo, You can also try putting <?php @ob_start(); ?> at top of your php file before everything. A complete detail about the function can be found at php.net documentation. Main cause for the error is that you are echoing outputs before the headers statements. Rule is that the headers must not occur after any output created by the script, output may includes spaces and all possible characters.