I'm trying to screw around with headers and I'm running into a problem. My plan was to make a main html page called let's say "index.php" (oooo!) and then have it process the form with a "processform.php" page, then change the headers on that page back to "index.php" with a "good job!" message. So on the last line of the processform.php page, I put this:
header( "Location: categories.php?message=" . urlencode($message) );
and I get this:
Warning: Cannot modify header information - headers already sent by (output started at /path/to/stdb.php:7)
stdb.php is a mysql connect page that I store before my public pages (in hopes it prevents people from stealing my password). So apparently this page is started headers. If I cut and paste the contents of st.php into processlogin.php instead of including it, everything works just fine.
So...how come if I'm including the file, it interferes with my headers, but when I directly type it into the same page, it works just fine? I guess I don't quite get what starts a header.