Web hosting isp - A Trivia GameIn this chapter, we present a
A Trivia GameIn this chapter, we present a full working example of a small PHPapplication: a Web-based trivia game with a twist (the CertaintyQuiz ). The main virtue of the chapter is its completeness: Instead ofusing code fragments to illustrate talking points, as we do in mostother chapters, we re showing everything, soup to nuts. As a result, this is one of the larger examples in the book, weighing in at morethan 1300 lines of PHP code. Concepts Used in This ChapterThe code in this chapter uses a wide variety of techniques, tricks, and technologies that we ve presented elsewhere in the book. In particular: .We make heavy use of the object-oriented features of PHP(Chapter 20). .We rely on PHP s session mechanism to propagate game datafrom page to page (Chapter 24). .We use a back end database (MySQL) to store questions andhigh scores (Part II). .We do some behind-the-scenes mathematics, including approxi- mating nth roots (Chapters 10 and 27). .We use arrays for storing data and for manipulating datareturned from the database (Chapters 9 and 21). .We do a lot of string processing and concatenation to build ourdisplay pages, including the heredoc technique for templatingpages (Chapters 8 and 21). .We use the new exception-handling features of PHP5 to catchdatabase and session problems (Chapter 31). We highlight some of these topics in various sections later in thechapter as we delve into the code. 4646CHAPTER …In This ChapterA guessing game withapproximate answersThe object-orientedimplementation of thegameDatabase and sessionsupportDesign considerations …
We recommend high quality webhost to host and run your jsp application: christian web host services.