A few changes on functions.inc.php, mainly in replacing the old mysq_ functions with PDO methods.