I have created a mail form which works but doesn't like the redirect to thanks.php. Could someone help me debug this please. Thanks
Error msg I get
Warning: Cannot add header information - headers already sent by (output started at /home/www/ourfuturetogether/forms/contact.php:2) in /home/www/ourfuturetogether/forms/contact.php on line 44
Line 44 code = header('Location: thanks.php');
If I change the code to echo then it does print without any complains but I need it to redirect it to the thank you page I have created.
any help would be appreciated. Thanks
Error msg I get
Warning: Cannot add header information - headers already sent by (output started at /home/www/ourfuturetogether/forms/contact.php:2) in /home/www/ourfuturetogether/forms/contact.php on line 44
Line 44 code = header('Location: thanks.php');
If I change the code to echo then it does print without any complains but I need it to redirect it to the thank you page I have created.
any help would be appreciated. Thanks