{"id":7285,"date":"2014-04-17T05:05:44","date_gmt":"2014-04-16T19:05:44","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=7285"},"modified":"2014-04-17T05:05:44","modified_gmt":"2014-04-16T19:05:44","slug":"htmljavascript-and-php-quiz-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-and-php-quiz-tutorial\/","title":{"rendered":"HTML\/Javascript and PHP Quiz Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/\"><img decoding=\"async\" style=\"float:left;border: 15px solid pink;\" alt=\"HTML\/Javascript and PHP Quiz Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/quiz_html_php.jpg\" title=\"HTML\/Javascript and PHP Quiz Tutorial\"  \/><\/a><p class=\"wp-caption-text\">HTML\/Javascript and PHP Quiz Tutorial<\/p><\/div>\n<p>A quiz is a fairly common way to learn, and a short answer or multiple choice quiz is easy to design with HTML and Javascript.<\/p>\n<p>Today we show you a simple quiz consisting of ten questions with a button and\/or input tag approach to getting the user feedback (ie. answer).  This is fine and dandy for the simple case, and, it has to be said, HTML and Javascript could team up with Ajax and stored *.XML or *.CSV (on the website) to do what we do next.<\/p>\n<p>What we do next is to add a layer of PHP to make things more interesting.   We just do a series of simple str_replace statements to add dropdowns instead of some of the words of the questions &#8230; to be honest the HTML and Javascript were designed for smarts getting ready for this &#8230; but still and all it is pretty impressive how just a little bit of PHP server-side logic can add so much to the interest of the quiz &#8230; though maybe you&#8217;re bored to billeo-less (aren&#8217;t we polite?!).<\/p>\n<p>Think PHP works well as the value-adder to existing client-thoughtful HTML and Javascript &#8230; <a target=_blank title='huh' href='http:\/\/poetry.rapgenius.com\/William-shakespeare-richard-iii-act-4-scene-2-annotated'><i>what sayest thou, my liege<\/i><\/a>?<\/p>\n<p>Please enjoy today&#8217;s <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/\" title='Click Picture'>tutorial<\/a> as the live run that is the PHP (source code <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/quiz.php_GETME\" title='quiz.php'>quiz.php<\/a>) or as <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/quiz.html\" title='Click Picture'>tutorial<\/a> to compare with the live run that is the HTML (source code <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/quiz.html_GETME\" title='quiz.html'>quiz.html<\/a>).<\/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='#d7285' onclick='var dv=document.getElementById(\"d7285\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=PHP\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d7285' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>A quiz is a fairly common way to learn, and a short answer or multiple choice quiz is easy to design with HTML and Javascript. Today we show you a simple quiz consisting of ten questions with a button and\/or &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/htmljavascript-and-php-quiz-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,37],"tags":[367,576,652,932,997,1022,1319],"class_list":["post-7285","post","type-post","status-publish","format-standard","hentry","category-elearning","category-tutorials","tag-dropdown","tag-html","tag-javascript","tag-php","tag-programming","tag-quiz","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7285"}],"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=7285"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/7285\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=7285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=7285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=7285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}