I have a site that contains multiple objects (form, menu bar, etc).
At the same time, I am "including" with PHP another page that contains an API making a request. When this page will receive a response, it does the following:
header('Location: ' . $url);
However, the issue is that I want this redirection to happen within my own page. The issue is that I get the typical error:
"Warning: Cannot modify header information - headers already sent by.."
right before the header('Location...
gets executed.
I guess I cannot do the redirect while staying in the same page?
How could I fix this so I can stay in the same page while the API runs the request and response and then displays the result?
Thanks