{"id":12084,"date":"2015-02-02T05:02:28","date_gmt":"2015-02-01T18:02:28","guid":{"rendered":"http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=12084"},"modified":"2015-02-02T05:02:28","modified_gmt":"2015-02-01T18:02:28","slug":"php-rhopalic-letter-sentence-game-primer-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-rhopalic-letter-sentence-game-primer-tutorial\/","title":{"rendered":"PHP Rhopalic Letter Sentence Game Primer Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"PHP Rhopalic Letter Sentence Game Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.jpg\" title=\"PHP Rhopalic Letter Sentence Game Primer Tutorial\"    \/><\/a><p class=\"wp-caption-text\">PHP Rhopalic Letter Sentence Game Primer Tutorial<\/p><\/div>\n<p>Today we put the implications of <a target=_blank title='HTML Form Multiple Submit Buttons Primer Tutorial' href='#hfmsbpt'>HTML Form Multiple Submit Buttons Primer Tutorial<\/a> as shown below, to use, for a <a target=_blank title='callback information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Callback_%28computer_programming%29'><i>callback<\/i><\/a> scenario in two parts, the most complex part of which we want to differentiate about the instigation of sharing (or challenging) functionality to  allow for the sending of an email regarding a snapshot look about the game&#8217;s state of play.<\/p>\n<p>So what does <i>&#8220;rhopalic&#8221;<\/i> mean?  Maybe you dream of a week consisting of &#8220;rhopalic&#8221; lunch breaks?  Or year by year having &#8220;rhopalic&#8221; feeling holiday periods?   Yes, a <a target=_blank title='rhopalic' href='http:\/\/en.wiktionary.org\/wiki\/rhopalic'><i>&#8220;rhopalic&#8221;<\/i><\/a> sentence consists of words that keep getting longer by one letter, or one syllable &#8230; we do the <i>one letter<\/i> concept, today, with our English word game &#8230; <i>&#8220;English&#8221;<\/i> because we rely on an English dictionary lookup where we call on our web server here at www.rjmprogramming.com.au to look up its inbuilt Linux English based dictionary files &#8230; for the fastest, and homegrown, effect &#8230; perhaps you&#8217;d like to consult <a href=\"http:\/\/en.wikipedia.org\/wiki\/Words_%28Unix%29\" title=\"Words (unix) information from Wikipedia\" target_blank=\"\">Linux dictionary files<\/a> for more information here.<\/p>\n<p>This game has an <a target=_blank title='ESL information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/English_as_a_second_or_foreign_language'>ESL<\/a> feel to it, but am not sure you should expose an early English learner to its trivialisation of the language.   A <i>&#8220;rhopalic&#8221;<\/i> sentence outside the hands of a great English wordsmith is a sad sight indeed &#8230;. just play the <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php\" title='Click picture'>game<\/a> and see the &#8220;lame&#8221; sentence presented as the default (ie. no English wordsmiths were involved), and you see what I mean &#8230; but am sure there are great wordsmiths out there? &#8230; and that they may know each other&#8217;s email addresses?! &#8230; and are up for a challenge?!?<\/p>\n<p>Here is some downloadable PHP programming source code you could call <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php_GETME\" title='rhopalic_letter_sentence.php'>rhopalic_letter_sentence.php<\/a> or try a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php\" title='Live run'>live run<\/a> or simulate the return of an emailee&#8217;s interaction <a target=_blank title='email back' href='http:\/\/www.rjmprogramming.com.au\/PHP\/rhopalic_letter_sentence.php?w1=A&#038;w2=go&#038;w3=for&#038;w4=them&#038;w5=could&#038;w6=really&#038;w7=improve&#038;w8=fairness&#038;w9=standards&#038;w10=constantly&#038;w11=threatening&#038;w12=cohesiveness&#038;w13=&#038;w14=&#038;w15=&#038;w16=&#038;w17=&#038;w18=&#038;w19=&#038;w20=&#038;w21=.&#038;score=0&#038;goes=0&#038;email=y&#038;submit=Validate+and+Email'>here<\/a>.<\/p>\n<p>Hope you enjoy the game and get further thought bubbles regarding HTML form multiple submit button usage possibilities.<\/p>\n<p>If you are wondering where the <i>&#8220;rhopalic&#8221;<\/i> idea came from?   Answering (wrongly, as it happens) a <a target=_blank title='Sydney Morning Herald' href='http:\/\/www.smh.com.au'>Sydney Morning Herald<\/a> (the mobile app edition of the paper) quiz question a few days back.<\/p>\n<hr \/>\n<p id='hfmsbpt'>Previous relevant <a target=_blank title='HTML Form Multiple Submit Buttons Primer Tutorial' href='http:\/\/www.rjmprogramming.com.au\/wordpress\/?p=12054'>HTML Form Multiple Submit Buttons 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\/HTMLCSS\/multiple_form_submit_buttons.html\"><img decoding=\"async\" style=\"float:left; border: 15px solid pink;\" alt=\"HTML Form Multiple Submit Buttons Primer Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/Quiz\/multiple_form_submit_buttons.jpg\" title=\"HTML Form Multiple Submit Buttons Primer Tutorial\"    \/><\/a><p class=\"wp-caption-text\">HTML Form Multiple Submit Buttons Primer Tutorial<\/p><\/div>\n<p>Today we want to discuss a very old HTML concept called the <a target=_blank title='HTML form tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_form.asp'><i>form<\/i><\/a> tag which allows for the processing of interactive input from the user in the form of textboxes and checkboxes and radio buttons and buttons to transfer information from one webpage to another, somewhere.<\/p>\n<p>For clarity, today, we only use buttons, and you may ask, <i>&#8220;What good are buttons on their own for imparting information?&#8221;<\/i> &#8230; and will ignore the obvious answer that a button press anywhere, depending on the event logic, can mean so much &#8230; after all, we all envisaged the disaster of a nuclear holocaust envisaging the press of one button &#8230; no, we want to talk about the idea that you can have more than one <i>input<\/i> tag with <i>type=&#8217;submit&#8217;<\/i> &#8230; and this was not always the case, because in the early days of HTML there was the one <a target=_blank title='HTML input tag type=submit button information from w3schools' href='http:\/\/www.w3schools.com\/html\/html_forms.asp'><i>submit button<\/i><\/a> allowed on one HTML form &#8230; now you can even have more than one <i>form<\/i> &#8230; but this is for another day.<\/p>\n<p>Anyway, you might still ask, anyway, <i>&#8220;Ignoring the huge event logic possibilities of a button press (because you are not trying to trick me here), what good are buttons on their own for imparting information?&#8221;<\/i> &#8230; well, it means on the <a target=_blank title='callback information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Callback_%28computer_programming%29'><i>callback<\/i><\/a> &#8230; and today we just callback the same HTML code (via the <i>form<\/i>&#8216;s <i>action=<\/i> designation of itself, today) &#8230; as we often like to do at this blog, by the way &#8230; we can compartmentalize via the <i>GET<\/i> (in our form&#8217;s <i>method<\/i> case &#8230; for starters, with <i>POST<\/i> we&#8217;d need <a target=_blank title='Ajax information from Wikipedia ... thanks' href='http:\/\/en.wikipedia.org\/wiki\/Ajax_%28programming%29'>Ajax<\/a> or a server language, and remember we are trying to keep things more basic here) parameters in the <i>callback<\/i> URL (stored in &#8220;Javascript DOM land&#8221; as <a target=_blank title='Javascript DOM document.URL information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/prop_doc_url.asp'><i>document.URL<\/i><\/a>) according to the <i>value<\/i> of that <i>submit button<\/i> whose <i>name<\/i> becomes that <i>GET<\/i> parameter&#8217;s name &#8230; so that for an HTML <i>form<\/i>&#8216;s <i>submit button<\/i> like &#8230;<\/p>\n<p><code><br \/>\n&lt;input type='submit' title='Submit of form to an embedded iframe' onclick='cif();' name='submitiframe' id='submitiframe' value='Validate and Iframe'&gt;&lt;\/input&gt;<br \/>\n<\/code><\/p>\n<p>&#8230; its contributing part of the <i>callback<\/i> URL, in our code, is &#8230;<\/p>\n<p><code><br \/>\n... ?submitiframe=Validate+and+Iframe ...<br \/>\n<\/code><\/p>\n<p>&#8230; and so we can, in Javascript, at the <a target=_blank title='HTML body onload event information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/event_onload.asp'><i>onload<\/i> event<\/a>&#8216;s code &#8230; have an <i>else if<\/i> statement like &#8230;<\/p>\n<p><code><br \/>\n  } else if (document.URL.indexOf('iframe=') != -1) {<br \/>\n    \/\/ do something here<br \/>\n  }<br \/>\n<\/code><\/p>\n<p>&#8230; to have a good compartmentalizing of &#8220;action&#8221; segments of code that is quite readable and understandable.<\/p>\n<p>If the case is not clear &#8230; please tee up a <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/multiple_form_submit_buttons.html\" title='Click picture'>live run<\/a> with the HTML programming source code <a target=_blank href=\"http:\/\/www.rjmprogramming.com.au\/HTMLCSS\/multiple_form_submit_buttons.html_GETME\" title='multiple_form_submit_buttons.html'>multiple_form_submit_buttons.html<\/a>   &#8230; or else please try some HTML code yourself &#8230; the hardest concept here today is the embedding of an <a target=_blank title='HTML iframe tag' href='http:\/\/www.w3schools.com\/tags\/tag_iframe.asp'>iframe<\/a> in a hierarchical way (note the Javascript DOM manipulation of the <i>form<\/i>&#8216;s <i>target=<\/i> designation, as you examine the downloadable code above), and so for clarity we preface any iframe by a current client (ie. Javascript) timestamp, so you know who inherits who etcetera etcetera etcetera.<\/p>\n<p>Now even after all this, you may want to say, <i>&#8220;So what &#8230; an HTML <a target=_blank title='HTML a tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_a.asp' style='text-decoration:none;'><b>a<\/b><\/a> tag link can do all this.<\/i> &#8230; to which we say &#8230; that&#8217;s true &#8230; good to know there is more than one way to &#8220;skin a cat&#8221; &#8230; meowwwwwwww! &#8230; <font style='font-family:courier-new;' size=1>&#8220;no animals were harmed in the making of this tutorial&#8221;<\/font>.<\/p>\n<p>In fact you could go on and on and on with possibilities for the equivalent means by which to achieve the ends we have here with our HTML, such as using an <i>input<\/i> <i>type=&#8221;button&#8221;<\/i> or in HTML5, a <a target=_blank title='HTML5 button tag information from w3schools' href='http:\/\/www.w3schools.com\/tags\/tag_button.asp'><i>button<\/i><\/a> tag, and all these and more and more and more and more are worth exploring, and trying, yourself, or by researching the subject.   One day, in a real bind, with cross-browser issues, you may need that extra method, to make things work for all the platforms?!<\/p>\n<p><b><i>Did you know?<\/i><\/b><\/p>\n<p>With an HTML <i>input<\/i> <i>type=&#8221;submit&#8221;<\/i> (submit button), there is nothing stopping you storing more than just the &#8220;front look&#8221; of the button in its <i>value<\/i>= parameter.   If you want to do this, but there is no way you want to show that &#8220;data&#8221; as the &#8220;front look&#8221; of the button, perhaps it really should be an <a target=_blank title='input type=hidden information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/dom_obj_hidden.asp'><i>input<\/i> <i>type=&#8221;hidden&#8221;<\/i><\/a> piece of data, or you should hide it &#8230; via <a target=_blank title='style=display:none information from w3schools' href='http:\/\/www.w3schools.com\/jsref\/prop_style_display.asp'><i>style=&#8221;display:none;&#8221;<\/i><\/a> &#8230; Javascript DOM store data to it via <i>document.getElementById([itsID]).value=[myData];<\/i> &#8230; and, conditionally perhaps, click it via Javascript, via <i>document.getElementById([itsID]).<a target=_blank title='Javascript DOM click() method' href='http:\/\/www.w3schools.com\/jsref\/met_html_click.asp'>click()<\/a>;<\/i> method.\n<\/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='#d12054' onclick='var dv=document.getElementById(\"d12054\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=HTML\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d12054' 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='#d12084' onclick='var dv=document.getElementById(\"d12084\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"http:\/\/www.rjmprogramming.com.au\/wordpress\/?tag=game\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d12084' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Today we put the implications of HTML Form Multiple Submit Buttons Primer Tutorial as shown below, to use, for a callback scenario in two parts, the most complex part of which we want to differentiate about the instigation of sharing &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/php-rhopalic-letter-sentence-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,13,37],"tags":[326,388,396,476,477,576,652,707,932,997,1066,1215,1319,1411,1453],"class_list":["post-12084","post","type-post","status-publish","format-standard","hentry","category-elearning","category-esl","category-tutorials","tag-dictionary","tag-english","tag-esl","tag-game","tag-games-2","tag-html","tag-javascript","tag-linux","tag-php","tag-programming","tag-rhopalic","tag-submit-button","tag-tutorial","tag-web-server","tag-word-game"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12084"}],"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=12084"}],"version-history":[{"count":0,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/12084\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=12084"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=12084"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=12084"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}