{"id":27462,"date":"2017-01-12T03:01:21","date_gmt":"2017-01-11T17:01:21","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/ITblog\/?p=27462"},"modified":"2017-01-11T16:20:17","modified_gmt":"2017-01-11T06:20:17","slug":"worldwide-country-quiz-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/worldwide-country-quiz-game-primer-tutorial\/","title":{"rendered":"Worldwide Country Quiz Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/worldwide_country_quiz.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Worldwide Country Quiz Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/worldwide_country_quiz.JPG\" title=\"Worldwide Country Quiz Game Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Worldwide Country Quiz Game Primer Tutorial<\/p><\/div>\n<p>It feels like we&#8217;ve been here before, because of  <a title='Country Quiz Game Suite YouTube Tutorial' href='#cqgsyt'>Country Quiz Game Suite YouTube Tutorial<\/a>&#8216;s Flag\/Capital\/Currency &#8220;listy&#8221; approach, but the fact is, as you program, you find interesting alternative ways to do things, and you hope that alternative ways of doing things also present themselves.  This latter concept is primarily good, in our eyes, because it is likely you&#8217;ll improve on an earlier effort, given its thinking and logic &#8220;added on&#8221; to your current thinking and logic.<\/p>\n<p>And so today&#8217;s &#8220;Worldwide Country Quiz&#8221; came about for us thinking about that previous <a title='Country Quiz Game Suite YouTube Tutorial' href=' href='#cqgsyt'>Country Quiz Game Suite YouTube Tutorial<\/a> idea with a <a target=_blank title='Google Chart' href='https:\/\/developers.google.com\/chart\/'>Google Chart<\/a> mapping component addition (thanks).   Then we thought of the Google Chart <a target=_blank title='Googl Chart Geo Chart information' href='https:\/\/developers.google.com\/chart\/interactive\/docs\/gallery\/geochart'>Geo Chart<\/a> and wondered where it could fit into our line of thinking.  We&#8217;d forgotten how it worked, and indeed, revisiting the Google Chart Geo Chart webpage, as with the <a target=_blank title='MAMP' href='http:\/\/mamp.info'>MAMP<\/a> &#8220;revisit&#8221; recently, we saw that &#8220;functionality&#8221; had extended, and moved on.  It is a bit like that John Lennon <a target=_blank title=\"Life is what happens to you when you're busy making other plans ...\" href='https:\/\/www.youtube.com\/watch?v=XO2v7qZClbw'>song<\/a>?   But the new Geo Chart functionality added to the traditional &#8220;marker&#8221; functionality we knew, might need to be looked at another day, whereas a rethink of the &#8220;marker&#8221; functionality and some additional user passed data, we decided, would be enough to swing it so that we could create this new &#8220;Worldwide Country Quiz&#8221; via &#8230;<\/p>\n<ul>\n<li>adding to the Google Chart Geo Chart interface web application two new optional data items, namely [&#038;]guess[=][CountryNameAnswer] and [&#038;]question[=][QuestionThatGivesYouTheCountryNameAnswer] &#8230; and &#8230;<\/li>\n<li>forming a possible relationship for this Google Chart Geo Chart to be an HTML iframe &#8220;child&#8221; of a &#8220;parent&#8221; (probably) HTML web application that takes an array of this &#8220;question&#8221; and &#8220;guess&#8221; data and forms URLs to the Google Chart Geo Chart &#8220;child&#8221; who communicates back up to their parent by adjusting the &#8230;<\/li>\n<li>HTML h4 &#8220;score&#8221; element of the supervising &#8220;parent&#8221; is being monitored via a &#8220;setTimeout&#8221; function by the &#8220;parent&#8221; themselves, a change signifying the reason to go and pick out array question URL from the array we talked about earlier<\/li>\n<\/ul>\n<p>The pleasing thing we found about this design, that we didn&#8217;t plan, but it became apparent, was that this &#8220;quiz&#8221; functionality can be used by just using the Google Chart Geo Chart web application on its own, have two players hovering, and while one player looks away, the other &#8220;questioning&#8221; player can, at the &#8220;rejigged&#8221; <i>title<\/i> Javascript prompt window designate a <i>guess<\/i> and <i>question<\/i> data item, specifying the [&#038;]onclick[=]Y as they do this, and proceed pretty much as normal with the rest of the normal Google Chart Geo Chart specification steps they normally do, but perhaps best off giving every Country they give a Value too the same Value, so that later when the &#8220;answering&#8221; player is allowed to turn around, what they see is a Javascript prompt window showing the &#8220;questioning&#8221; player&#8217;s quiz question with several equally tinted Country outlines (that are the only ones whose onclick &#8220;select&#8221; logic will trigger, when clicked or tapped) will show as the Multiple Choice choices constructed by the &#8220;questioning&#8221; player as the challenge for the &#8220;answering&#8221; player to pick (or click or tap) correctly. <\/p>\n<p> Only in the case of that Google Chart Geo Chart being supervised by a (probably) HTML and Javascript web application that has any innerHTML type HTML element named &#8220;score&#8221;, a correct answer scores (all of) one point, but even if wrong, triggers an incrementing of the &#8220;goes&#8221; count part of the. &#8230;<\/p>\n<p><code>parent.document.getElementById('score').innerHTML='Score: ' + [childDeterminedScoreValue] + '\/' + [childDeterminedGoesBit];<\/code><\/p>\n<p> &#8230; design, enough to give the supervising &#8220;parent&#8221; the means by which to know that the &#8220;show&#8221; (quiz) should go on.<\/p>\n<p>This <a target=_blank title='Double Jeopardy' href='https:\/\/www.youtube.com\/watch?v=F1n3_h1JI_E'>&#8220;Double Jeopardy&#8221;<\/a> feeling game can be played via this supervised &#8220;parent&#8221; HTML and Javascript <a target=_blank title='Worldwide Country Quiz' href='http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/worldwide_country_quiz.html'>live run<\/a>  (whose code you could peruse and\/or download via <a target=_blank title='worldwide_country_quiz.html_GETME' href='http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/worldwide_country_quiz.html_GETME'>worldwide_country_quiz.html<\/a>) or played in that other method mentioned above, just with the Google Chart Geo Chart, with this alternative <a target=_blank title='Google Chart Geo Chart interface' href='http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/geo_chart.php'>live run<\/a> (with its amended PHP code you could call <a target=_blank title='geo_chart.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/geo_chart.php------GETME'>geo_chart.php<\/a>, modified in <a target=_blank title='geo_chart.php'  href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/GeoChart\/geo_chart.php------GETME'>this way<\/a>).<\/p>\n<p>We hope you enjoy either or both of the quiz (game) itself, or the design features of it.<\/p>\n<hr>\n<p id='cqgsyt'>Previous relevant <a target=_blank title='Country Quiz Game Suite YouTube Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/Country Quiz Game Suite YouTube Tutorial\/'>Country Quiz Game Suite YouTube Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Country Quiz Game Suite YouTube Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_quiz.jpg\" title=\"Country Quiz Game Suite YouTube Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Country Quiz Game Suite YouTube Tutorial<\/p><\/div>\n<p>Today we are adding optional functionality to our previous web application from <a title='Country Quiz Game Suite Tutorial' href='#cqgst'>Country Quiz Game Suite Tutorial<\/a> as shown below, and so it seems apt that we add one word for the title of today&#8217;s tutorial called &#8220;Country Quiz Game Suite YouTube Tutorial&#8221;, and that added word is <a target=_blank title='YouTube landing page' href='http:\/\/youtube.com'>&#8220;YouTube&#8221;<\/a>, the biggest repository of videos in the online world.<\/p>\n<p>So we are trying to spice up the &#8220;dry&#8221; look of the &#8220;Country Quiz Game Suite&#8221; of web applications by adding optional lookups of YouTube so that the user can choose to watch a video about the last question that was asked about in the quiz.  Is there a reason to use a &#8220;YouTube&#8221; search for this, rather than a search engine search?  For us, yes, and this can be put down to the wonders of the <a target=_blank title='YouTube API for Iframe embedded videos' href='https:\/\/developers.google.com\/youtube\/iframe_api_reference'>YouTube API<\/a> designed for embedding in HTML <a target=_blank title='HTML iframe element information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> elements, which you can read a thread of blog posts about from <a target=_blank title='Karaoke via YouTube API in Iframe Email Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/karaoke-via-youtube-api-in-iframe-email-tutorial\/'>Karaoke via YouTube API in Iframe Email Tutorial<\/a> down.  This ability is a huge <a target=_blank title='UX information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/User_experience'>UX<\/a> positive for use of these web applications, on mobile platforms in particular, because the YouTube video &#8220;interface&#8221; parts of the webpage can be placed on the webpage the user is currently using, rather than having to open any new windows, and have the user be in danger of &#8220;losing the plot&#8221;.<\/p>\n<p>Added to that advantage is the way the user can do research and development on topics that may interest them.  To us, the most important point here.<\/p>\n<p>So far we&#8217;ve talked about <i>what<\/i> the changes involve, and now we&#8217;ll turn our attention to <i>how<\/i> these changes were achieved.  In broad brush terms &#8230;<\/p>\n<ul>\n<li>we introduce new external Javascript you could call <a target=_blank title=\"country_quiz.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_quiz.js_GETME\">country_quiz.js<\/a> called by the parent &#8230;\n<ul>\n<li>Country Flag Quiz &#8230; <a target=_blank title='country_flag_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php--GETME'>country_flag_quiz.php<\/a> (changed just to do with calling that external Javascript as per <a target=_blank title='country_flag_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php--GETME'>this link<\/a>) and with this <a target=_blank title='Click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php'>live run<\/a><\/li>\n<li>Country Currency Quiz &#8230; <a target=_blank title='country_currency_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php-GETME'>country_currency_quiz.php<\/a> (changed just to do with calling that external Javascript as per <a target=_blank title='country_currency_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php-GETME'>this link<\/a>) and with this <a target=_blank title='Click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php'>live run<\/a><\/li>\n<li>Country Capital Quiz &#8230; <a target=_blank title='country_capital_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php-GETME'>country_capital_quiz.php<\/a> (changed just to do with calling that external Javascript as per <a target=_blank title='country_capital_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php--GETME'>this link<\/a>) and with this <a target=_blank title='Click picture' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php'>live run<\/a><\/li>\n<\/ul>\n<p>&#8230; using a call like &#8230;\n<\/li>\n<li><code>&lt;script type='text\/javascript' src='country_quiz.js' defer='defer'&gt;&lt;\/script&gt;<\/code><\/li>\n<li>the <i>defer<\/i> HTML <a target=_blank title='HTML script tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_script.asp'>script<\/a> tag attribute used to delay its loading to the end of loading, and also placed so that &#8230;<\/li>\n<li>the call of the external Javascript is placed after local Javascript <a target=_blank title='HTML script tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_script.asp'>script<\/a> tag client logic, because &#8230;<\/li>\n<li>we <i>&#8220;overload&#8221;<\/i> the local Javascript &#8220;function <i>check()<\/i>&#8221; with a version from the external Javascript <a target=_blank title=\"country_quiz.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_quiz.js_GETME\">country_quiz.js<\/a>, and we&#8217;ve discussed this Javascript style of overloading, before, when we presented <a target=_blank title='Javascript Function Overload Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/javascript-function-overload-primer-tutorial\/'>Javascript Function Overload Primer Tutorial<\/a> (where we overloaded the &#8220;encodeURIComponent&#8221; method) &#8230; and in that &#8230;<\/li>\n<li>external Javascript <a target=_blank title=\"country_quiz.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_quiz.js_GETME\">country_quiz.js<\/a> &#8220;function <i>check()<\/i>&#8221; potentially loads YouTube API functionality to an HTML iframe element which was first created via &#8230;<\/li>\n<li>a one off <a target=_blank title='Javascript setTimeout() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'>setTimeout<\/a> piece of logic is called by the external Javascript <a target=_blank title=\"country_quiz.js\" href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_quiz.js_GETME\">country_quiz.js<\/a> to &#8230;\n<ul>\n<li>append the HTML for that YouTube API HTML iframe &#8220;container&#8221; element to <i>document.body<\/i><\/li>\n<li>append to the first HTML h3 element an HTML input type=checkbox, initially checked, toggling the use of that option YouTube API (to HTML iframe element) functionality<\/li>\n<\/ul>\n<p>&#8230; this <a target=_blank title='Javascript setTimeout() method information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/met_win_settimeout.asp'>setTimeout<\/a> methodology remaining as independent from any potential logic clashes with parent HTML Javascript <i>onload<\/i> event logic<\/li>\n<\/ul>\n<ul>\n<p>Nothing changes about the <i>peer to peer<\/i> nature of this &#8220;Country Quiz Game Suite&#8221; of web applications, so we encourage you to try any\/all of them &#8230; let&#8217;s try &#8230; <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php\">flags<\/a>.<\/p>\n<hr>\n<p id='cqgst'>Previous relevant <a target=_blank title='Country Quiz Game Suite Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/Country Quiz Game Suite Tutorial\/'>Country Quiz Game Suite Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Country Quiz Game Suite Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.jpg\" title=\"Country Quiz Game Suite Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Country Quiz Game Suite Tutorial<\/p><\/div>\n<p>Think we may have done a (web application software) set before, but honestly cannot locate it, but in any case we are here today to tell you about one of the joys of server side programming, in our case PHP.<\/p>\n<p>That joy, for us, is when you get into a pattern of completely <i>peer to peer<\/i> software components, in our case PHP serverside web applications.  What do we mean by <i>peer to peer<\/i> in the way we feel about the thought?  It means that several, usually small, completely independent web applications can &#8230;<\/p>\n<ul>\n<li>as such, be easily unit tested within themselves &#8230; but &#8230;<\/li>\n<li>they each have a similar, and really easy, approach to, just right at the end of coding &#8230; ie. when they are all individually coded &#8230; link them to be pointable at each other &#8220;<i>peer to peer<\/i>&#8221; &#8230; guess the difference here, unlike our penchant for &#8220;parent\/child&#8221; (which we are also very fond of), each web application component is independent and of &#8220;equal&#8221; status in our tiny little woooorrrrrrlllld!<\/li>\n<\/ul>\n<p> &#8230; and this really appeals to us.  Sometimes such an arrangement can be thought of as a <a target=_blank title='Suite of program information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Software_suite'>&#8220;suite&#8221;<\/a> of web applications (or programs).<\/p>\n<p>So what is that really simple mechanism of linking &#8230;<\/p>\n<ul>\n<li>Country Flag Quiz &#8230; from yesterday (with <a title='Country Flag Quiz Game Primer Tutorial' href='#cfqgpt'>Country Flag Quiz Game Primer Tutorial<\/a> as shown below) &#8230; <a target=_blank title='country_flag_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php-GETME'>country_flag_quiz.php<\/a> (and the only one to &#8220;change&#8221;, as such, as per <a target=_blank title='country_flag_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/Geographicals\/diff.php?one=http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php-GETME'>this link<\/a> &#8230; as described further below) <a target=_blank title='country_flag_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php'>live run<\/a> &#8230; to both of &#8230;<\/li>\n<li>Country Currency Quiz &#8230; new <a target=_blank title='country_currency_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php_GETME'>country_currency_quiz.php<\/a> <a target=_blank title='country_currency_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_currency_quiz.php'>live run<\/a> &#8230; and &#8230;<\/li>\n<li>Country Capital Quiz &#8230; new <a target=_blank title='country_capital_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php_GETME'>country_capital_quiz.php<\/a> <a target=_blank title='country_capital_quiz.php' href='http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.php'>live run<\/a> &#8230; but not like this <a target=_blank title='?' href='http:\/\/ericpetersautos.com\/2014\/10\/27\/shall\/'>&#8220;capital&#8221;<\/a> &#8230; chortle, chortle &#8230;<br \/>\n<img decoding=\"async\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_capital_quiz.jpg\" title='Country Capital Quiz' alt='Country Capital Quiz'><\/img>\n<\/li>\n<\/ul>\n<p>?  We just have a rearranged HTML <a target=_blank title='HTML select tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_select.asp'>select<\/a> (dropdown) element as below (exemplified below for the &#8220;Country Capital Quiz&#8221;) &#8230;<\/p>\n<p><code><br \/>\n&lt;select onchange=' location.href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_\" + this.value.toLowerCase() + \"_quiz.php\"; '&gt;&lt;option value=Capital&gt;Capital&lt;\/option&gt;&lt;option value=Currency&gt;Currency&lt;\/option&gt;&lt;option value=Flag&gt;Flag&lt;\/option&gt;&lt;\/select&gt;<br \/>\n<\/code><\/p>\n<p> &#8230; but just arrange for the &#8220;home&#8221; top HTML option element to point at the quiz theme of interest for that piece of web application PHP software.<\/p>\n<p>And the placement of such a dropdown?  Well, we often annoy our HTML h1 elements with such dropdowns, but we&#8217;ve been a little more <a target=_blank title='UX information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/User_experience'>UX<\/a>y today, by replacing an otherwise less dynamic (HTML (table) th element) heading (single word), with something dynamic, and perhaps useful, to some quizzer users out there in &#8220;net&#8221; land!<\/p>\n<p>And this is what we like to think of as &#8220;clobbering&#8221; <font size=1>(but we encourage you to think of a less aggressive word perhaps)<\/font> something not very dynamic with something dynamic, but optionally so, in that it is up to the user whether they make use of the added functionality, or not, is another way &#8220;<a target=_blank title='?' href='https:\/\/www.youtube.com\/watch?v=TWbNQiS-TU8'><strike>some of us<\/strike><\/a> we like to roll&#8221;.<\/p>\n<p>Now, perhaps you are thinking it rather cheeky to say that this is so <i>peer to peer<\/i> with the quiz concepts being so different, and yes, that is so, but what does bring things together is the generosity of the &#8220;net&#8221; and its data resources to find out information, so, we&#8217;d like to thank &#8230;<\/p>\n<ul>\n<li>Country Flag Quiz &#8230; thanks to <a target=_blank title='Thanks' href='https:\/\/tiki.org\/'>Tiki Wiki<\/a> CMS &#8230; effectively giving up a country list to work with &#8230; and &#8230;<\/li>\n<li>Country Currency Quiz &#8230; thanks to <a target=_blank title='Thanks' href='http:\/\/www.nationsonline.org\/oneworld\/currencies.htm'>this link<\/a> links countries to currencies (and (3 letter) country codes and (3 letter) currency codes) &#8230; and &#8230;<\/li>\n<li>Country Capital Quiz &#8230; thanks to <a target=_blank title='Thanks' href='https:\/\/www.countries-ofthe-world.com\/capitals-of-the-world.html'>this link<\/a> links countries to capitals<\/li>\n<\/ul>\n<p>If you don&#8217;t have an interest in a server side language like PHP to <i>glean<\/i> such information, please consider <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> programming techniques to be able to (just) stick with HTML and Javascript and CSS (client side) coding.  But if you do &#8230; your PHP homework for today is to read about the <a target=_blank title='file_get_contents' href='http:\/\/us1.php.net\/file_get_contents'>file_get_contents<\/a> method.<\/p>\n<hr>\n<p id='cfqgpt'>Previous relevant <a target=_blank title='Country Flag Quiz Game Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/country-flag-quiz-game-primer-tutorial\/'>Country Flag Quiz Game Primer Tutorial<\/a> is shown below.<\/p>\n<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"Country Flag Quiz Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.jpg\" title=\"Country Flag Quiz Game Primer Tutorial\"   \/><\/a><p class=\"wp-caption-text\">Country Flag Quiz Game Primer Tutorial<\/p><\/div>\n<p>Often, the simpler you make the working of a web application, the more appealing it is.  Not always, but often.  Lots of us like to test our knowledge with a quiz, and lots of us have our specialty subjects.  So, today&#8217;s &#8220;Country Flag Quiz&#8221; web application, that we also talk about at WordPress 4.1.1&#8217;s <a target=_blank title='Country Flag Quiz Game Primer Tutorial' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/country-flag-quiz-game-primer-tutorial\/'>Country Flag Quiz Game Primer Tutorial<\/a>, will be right up the alley of some people.  Got to say that it felt like a huge challenge to get a decent score in this game, speaking personally, and found myself resorting to &#8230; <font size=1>but we digress<\/font> &#8230; to come up with a pass mark for the game.<\/p>\n<p>Today&#8217;s game we wrote in PHP (that you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php_GETME\">country_flag_quiz.php<\/a> and which you can try with today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/country_flag_quiz.php\" title=\"Click picture\">live run<\/a> link) and used its <a target=_blank title='Supercalifragilisticexpialidocious information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Supercalifragilisticexpialidocious'>Supercalifragilisticexpialidocious<\/a> <a target=_blank title='PHP glob method information' href='http:\/\/php.net\/manual\/en\/function.glob.php'><i>glob<\/i><\/a> method &#8230; we&#8217;ve spoken about (quite a bit) <a target=_blank title='PHP glob mentions here' href='https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/glob'>here<\/a>.<\/p>\n<p>We need to thank the excellent <a target=_blank title='Tiki Wiki home page' href='https:\/\/tiki.org\/'>Tiki Wiki<\/a> <a target=_blank title='Content Management System information from Wikipedia ... thanks' href='https:\/\/en.wikipedia.org\/wiki\/Content_management_system'>CMS<\/a> product (which you can try for yourself at this <a target=_blank title='Tiki Wiki test CMS website at RJM Programming' href='http:\/\/www.rjmprogramming.com.au\/tikiwiki'>test website<\/a>) for the help with the country flag imagery, as well, today.<\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d26423' onclick='var dv=document.getElementById(\"d26423\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/quiz\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d26423' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d26434' onclick='var dv=document.getElementById(\"d26434\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/php\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d26434' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d26490' onclick='var dv=document.getElementById(\"d26490\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/youtube\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d26490' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n<hr>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d27462' onclick='var dv=document.getElementById(\"d27462\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/google-chart\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d27462' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>It feels like we&#8217;ve been here before, because of Country Quiz Game Suite YouTube Tutorial&#8216;s Flag\/Capital\/Currency &#8220;listy&#8221; approach, but the fact is, as you program, you find interesting alternative ways to do things, and you hope that alternative ways of &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/worldwide-country-quiz-game-primer-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,14,15,37],"tags":[2081,476,1619,513,518,576,587,652,861,932,997,1022,1866,1126,1319,1345,1402],"class_list":["post-27462","post","type-post","status-publish","format-standard","hentry","category-elearning","category-event-driven-programming","category-games","category-tutorials","tag-country","tag-game","tag-geo-chart","tag-google","tag-google-chart","tag-html","tag-iframe","tag-javascript","tag-onclick","tag-php","tag-programming","tag-quiz","tag-select","tag-settimeout","tag-tutorial","tag-url","tag-web-application"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27462"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=27462"}],"version-history":[{"count":12,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27462\/revisions"}],"predecessor-version":[{"id":27474,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/27462\/revisions\/27474"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=27462"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=27462"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=27462"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}