I have a main page that does some authentication processing and then when finished redirects using header redirect. All was working well until I recently updated one of the includes to carry a variable. see below.
<?php
session_start();
include "globalvariables.php";
include "../../includes/databaseconnections/$schoolName/database_connection.php";
I was having no problems until I added $schoolName to the string. I needed this for our automated replication system (lets users copy the page and database with a different schoolName for different customers)
Here is the included file. pretty simple.
<?php
$schoolName = "fakeschoolname";
?>
I am not understanding how headers are already being sent, unless $schoolName is actually outputting invisible, non server side data. Does anyone have any suggestions or ideas on how to remedy this? Or is there a better way to dynamically copy and edit pages?