Set card game in PHP and JavaScript