0

So I was asked to fix a page that uses PHP and MySQL to manage a reservation system, they updated the SQL to MariaDB, they jumped from PHP 5.6 to 7.4 so I had to fix other things, all is fixed but I'm stuck with this error. When you are about to send the form, it should either take you to a successful page or an external paypal page, but it is sending users to the error.php. I have read already some questions about it and I'm trying to find the error but not so sure, I'm not that good with PHP.

I already checked for BOM and its not there.

The error:

Cannot modify header information - headers already sent by (output started at /home/achievet/public_html/reserve.php:1302) in /home/achievet/public_html/reserve.php on line 1305

The part of the code:

<script type="text/javascript">
window.location="error.php";
</script>
<?
    header("Location: error.php");
        }else
            if ($mr->getTipoCobro() != 1) {
                echo "";
?>
<script type="text/javascript">
    window.location="success.php?true=1";
</script>
<?
    header("Location:success.php?true=1");
        }else
?>
<script type="text/javascript">
window.location="<? echo "final.php?true=1&w=".$sCodedTF.'&m='.$precio.'&v='.$sCodedIR.'&a='.$idres; ?>";
</script>
<?
    }
}
Dharman
  • 26,923
  • 21
  • 73
  • 125

0 Answers0