PHP and MariaDB tic-tac-toe game