reformatted DB.php to prevent mysql injection