Javascript based dice game with PHP and MySQL backend