Yes, tried that (see above - our posts must have been close together).
More info: If I create a php file with only the following in it, it works--
<?
$pageID = 205;
header("Location: http://mydomain.com/error.php?pageID=$pageID");
?>
But it doesn't work in the actual file where I'm trying to use it ??
The code there is:
$result = mysql_query($somesql,$db);
if (mysql_error()=="" && mysql_num_rows($result)>0) {
//set some vars etc.
} else {
header("Location: http://www.mydomain.com/error.php?pageID=$pageID");
}
This code occurs in an included file by the way; I don't see why that would make a difference.
I'm not getting any "headers already sent" errors.
Also, I have verified that I do in fact get into that ELSE section.
And that $pageID exists.