I know this question was answered many times, and I looked at the answers but still can't find a solution.
I have an index file that includes a contact form.
The contact form action is itself, and if the form succeeds it should redirect to index.php?content=thankyou
Althought the form is being sent successfuly, it does not redirect to index.php?content=thankyou, it tries to go again to itself: index.php?content=contact and I get the "cannot modify header..." error.
I've added ob_start, ob_flush, I checked for spaces after php codes, or anywhere else, nothing helps.
I am attaching the index, contact and the form class files.
The problem might be in the index file line: 56, or on the fgcontactform file line: 143.
I am losing hair here, please, can someone help?