Computer Operations/Database/General Rules

From MFIWiki
Revision as of 13:23, 16 March 2009 by Landrews (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
23 September 2020
Pd naval.jpg Pd marine.jpg SOC Pd hq.jpg SSD KTF Romulan_Legion
Trek Bar

Computer Operations Seal, designed by Samuel Cummings

MFI Computer Operations

MFI Database General Programming Rules


All DB pages need to start with the following code:

//Initial setup

session_start();
//Address error handling
ini_set ('display_errors', 1);
error_reporting (E_ALL & ~E_NOTICE);
// Include required files
include_once("include/db.inc.php");
include_once("include/error_handler.php");
// Start up our wonderful db connection
$conn = db_connect();

//Check user is logged into the DB system

if (! (isset($_SESSION['id']))) {
header("Location: dblogin.php");
exit;
}

Personal tools