Updated data filtering
Replaced MySQLi with PDO