Changed mysql connection from mysql_* to pdo