<?php require 'config.php'; require 'functions.php'; if ( php_sapi_name() != "cli" ) { session_name("LEDCONTROL"); session_start(); if ( !isset($_SESSION['LEDTARGETID']) ) { $_SESSION['LEDTARGETID'] = 0; } } // Make our PDO database connection which will be used in all scripts try { $globaldbh = new PDO("mysql:host=" . DBHOST . ";dbname=" . DBNAME, DBUSER, DBPASS); } catch (Exception $e) { echo "Persistence error!"; exit(); }