I have a couple of .php scripts which I am trying to redirect from when they have been send. These .php file are used to alot of things, such as email sign up and charging of cards through the payment service Stripe. It worked without any problems when I tried it on my local host, but now that I have uploaded my site to my Hostgator account I get the following error.
Warning: Cannot modify header information - headers already sent by (output started at /home1/ab56403/public_html/chargeCard.php:1) in /home1/ab56403/public_html/chargeCard.php on line 50
This is how I am trying to redirect, I have this code in the bottom of every .php script I am using.
header('Location: index.html');
exit;