Puzzled by this so thought I'd post it here see if anyone has ever had this problem. I've got a simple bit of code at the end of my php script that I've used many times before in other scripts with no problems but for some reason this one isn't working, it will not redirect to www.google.com
if(mysql_query($sql, $conn)){
header("Location: http://www.google.com");
} else {
echo "oops";
}
But to test the if statement, if I have something like this...
if(mysql_query($sql, $conn)){
echo "please redirect";
header("Location: http://www.google.com");
} else {
echo "oops";
}
The echo statement appears fine.
I've tried pasting the exact header code into a brand new file and it works ok, just not within this if statement!
Same problem with both IE and Firefox.
any ideas? 😉