brad62 — 2012-10-04T05:22:12-04:00 — #1
I'm going crazy. I did this so many times and now it's not working.
I have this line on a page:
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 " ?
ralphm — 2012-10-04T05:25:30-04:00 — #2
That looks OK to me. It might be something to do with the larger context. What does happen at the moment? Can you post more code?
brad62 — 2012-10-04T05:40:43-04:00 — #3
But when I write
<?php echo $url; ?>
The url is showing correct on the screen.
This code is working:
$url = $row_rs_band['url'];
This code is NOT working:
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.
brad62 — 2012-10-04T05:48:38-04:00 — #4
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...
cups — 2012-10-04T06:21:01-04:00 — #5
Two things to watch out for with header();
Do not output anything prior to calling it, not a space, new line, nothing.
on the line immediately below.
Turn on error_reporting when you spot this again.
OK, thats 3 things ...