<?php

	function sanitize($field)
	{
		global $dbc;

		$temp = mysqli_real_escape_string($dbc, trim($field));
		return $temp;
	}
	function clean($field)
	{
		global $dbc;
		$temp = htmlspecialchars_decode($field);

		return $temp;
	}
	function getFromDatabase($sql)
	{
		global $dbc;
		$result = mysqli_query($dbc, $sql) or die(mysqli_error($dbc));
		return $result;
	}
function var_dump_pre($mixed = null) {
  echo '<pre>';
  var_dump($mixed);
  echo '</pre>';
  return null;
}
function var_dump_ret($mixed = null) {
  ob_start();
  var_dump($mixed);
  $content = ob_get_contents();
  ob_end_clean();
  return $content;
}
	function var_dump_err($mixed = null) {
		error_log(var_dump_ret($mixed));
	}
?>