Web hosting ecommerce - 885Chapter 46A Trivia Gameif (mysql_num_rows($result) > 9) {
885Chapter 46A Trivia Gameif (mysql_num_rows($result) > 9) { while ($row = mysql_fetch_assoc($result)) { $answer_count = $row[ answer_count ]; $credit = $row[ credit ]; if (($this->_game->getCorrectAnswers() > $answer_count) || (($this->_game->getCorrectAnswers() == $answer_count) && ($this->_game->_credit > $credit))) { $eligible = TRUE; break; } } } else { $eligible = TRUE; } return($eligible); } else { throw newException( Game display has no database connection ); } } // Checksum is calculated when posting a score // (comprised of a number of correct answers plus// credit remaining) and the checksum is compared with// the submitted scores. A first line of defense against// spoofing (unless, of course, the checksum scheme is// published in a book or something). private function _checksumChecks ($answer_count, $credit, $checksum) { return($checksum == $this->_makeCheckSum($answer_count, $credit)); } private function _makeChecksum ($answer_count, $credit) { return ((round($credit)) * 17) * ($answer_count * 31); } private function _postHighScoreString () { // The greeting plus HTML form for actually submitting// a name to the high scores listglobal $PHP_SELF; $answer_count = $this->_game->getCorrectAnswers(); $credit = $this->_game->getCredit(); $checksum = $this->_makeChecksum($answer_count, $credit); $result_string = Continued52
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.