I recently uploaded my new files for my website and the header(location) call is not working. this is the error code displayed: "Warning: Cannot modify header information - headers already sent by (output started at /home/content/29/11516329/html/discount/truth.php:12) in /home/content/29/11516329/html/discount/truth.php on line 18"
here is the code I am using:
    <?php
    ob_start();
    $code = $_POST['code'];
    $secret=("abcdefg");
    if ($code == $secret)
       {
       header('Location:output.php');
       }
    else
       {
       echo "wrong code";
       }
    ob_end_flush();
    ?>
this was working for me on my local host but for some reason once it was uploaded it wouldnt work anymore. any suggestions on how to fix it?
 
    