I’m going crazy. I did this so many times and now it’s not working.
I have this line on a page:
header("Location: $url");
I tried to output the same thing on the page, without the redirect and it outputs what is set in $url.
But when I write that line, it doesn’t redirect. Am I doing something wrong with the " ?
The first thing is a code I placed to check if the output is correct.
Then when running the second one, I removed the first part, since there cannot be any output before a redirect.
I have no idea what I did now. I just wrote the code, uploaded the file and now it works.
Maybe an invisible space was inserted. Sometimes I’ve seen that when copying and pasting…