验证条件(如果)后如何重定向? 在php html或javascript中

I got an error, i was using header location to redirect after verify a condition and with localhost it was great. But I uploaded the web and now I got an error. I know the problem its because I use header location a lot of times and not in head, but between html and php code.

What can I use to redirect users to another page in this case? You know between.

Thank you very much.

I am not sure I understand your issue properly, however you can always use JavaScript to perform a redirection.

if (someCondition) {
    window.location.href = 'newUrl';
}

However, it's probably better to perform the redirection server-side. Have you tried http_redirect?