So, the includes have to remain as far as I can tell. After searching for a while, I came across the php buffer. I 'think' this means I could put the include()s in the buffer, but I can not figure out the order works... in other words...
Code: Select all
ob_start();
include_once('xPath.inc.php');
include_once($pathRoot.'password.inc.php');
include_once($pathClass.'mysqldb.class.php');
// perhaps here would go ob_end_flush() ????
//Open Connection to Database
$db = new MySQLClass();
$db->connect(MYSQL_HOST, MYSQL_USERNAME, MYSQL_PASSWORD);
$db->select(MYSQL_DB);
//Sanitize Inputs from SESSION and POST
sanitize_inputs();
// I then use some if else statements to find out if the login information is the same as the database, $dataPresent is defined for the below if statement, and no includes or any information is passed to the browser in all this code.
if ($dataPresent == "yes" ) {
header("location: http://www.domain.com/directory/workshop.php");
exit;
}Any ideas on how to make this work as intended? Or is this not possible with my current setup, and would JavaScript be better then?
Thank you for any and all help.
-Mike-