//date_default_timezone_set('Europe/London');
$dbHost="localhost";
$dbUser="timenjxh_user";
$dbPass="U6ec569r";
$dbTable="timenjxh_tardis";
$db = new mysqli($dbHost, $dbUser, $dbPass, $dbTable);
mysqli_set_charset($db, 'utf8');
function SQLprocess($field) {
//global $db;
if (empty($field)) {
return "NULL";
} elseif(is_numeric($field)&&substr($field,0,1)!="0"){
return $field;
} else {
return "'".str_replace("'","''",stringclean($field))."'";
//return "'".mysqli_real_escape_string($db,$field)."'";
}
}
function stringclean($string) {
//$findarray=array(chr(145),chr(146),chr(147),chr(148),chr(150),chr(151),chr(133));
$findarray=array("‘","’",'“','”',"–","—","…");
$replarray=array("'","'",'"', '"', "--", "--", "...");
return str_replace($findarray,$replarray,$string);
}
Warning: Undefined array key "UserLoggedIn" in /home/timenjxh/public_html/tardis/include.php on line 33
Warning: Undefined variable $diag in /home/timenjxh/public_html/tardis/include.php on line 83
Warning: Undefined array key "sort" in /home/timenjxh/public_html/tardis/items.php on line 8
Warning: Undefined array key "startdate" in /home/timenjxh/public_html/tardis/items.php on line 28
Warning: Undefined array key "enddate" in /home/timenjxh/public_html/tardis/items.php on line 36
Warning: Undefined variable $db in /home/timenjxh/public_html/tardis/items.php on line 117
Fatal error: Uncaught TypeError: mysqli_query(): Argument #1 ($mysql) must be of type mysqli, null given in /home/timenjxh/public_html/tardis/items.php:117
Stack trace:
#0 /home/timenjxh/public_html/tardis/items.php(117): mysqli_query()
#1 {main}
thrown in /home/timenjxh/public_html/tardis/items.php on line 117