I have some code that works fine until I add a header command. The code is:
if ($_SERVER['QUERY_STRING'] == NULL) {
print "No Query String";
}
When I change it to:
if ($_SERVER['QUERY_STRING'] == NULL) {
header( "Location: http://mysite.com" );
exit;
}
I get the following error if the condition is met:
Warning: Cannot modify header information - headers already sent by (output started at /[filepath]:12) in /[filepath] on [header line]