KCMC - PHP Online
Form of PHP Sandbox
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Enter Your PHP code here for testing/debugging in the Online PHP Sandbox. As in the usual PHP files, you can also add HTML, but do not forget to add the tag <?php
in the places where the PHP script should be executed.
Result of php executing
Full code of KCMC.php
- <table style="width:70%;">
- <tr>
- <th style="text-align:left;">Multiple Answer Interaction</th>
- <th style="text-align:left;">Answers: <strong>See bolded text above</strong></th>
- </tr>
- <tr style="background-color:gray; text-align:center;">
- <td colspan="2">Correct Feedback</td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="text" style="width:100%; box-sizing:border-box;" value="Correct! (Rationale)">
- </td>
- </tr>
- <tr style="background-color:gray; text-align:center;">
- <td colspan="2">First Try Incorrect Feedback</td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="text" style="width:100%; box-sizing:border-box;" value="Not quite. (Include rationale) Try again!">
- </td>
- </tr>
- <tr style="background-color:gray; text-align:center;">
- <td colspan="2">Second Try Incorrect Feedback</td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="text" style="width:100%; box-sizing:border-box;" value="Not quite. (Include rationale) Try again!">
- </td>
- </tr>
- <tr style="background-color:gray; text-align:center;">
- <td colspan="2">Third Try Incorrect Feedback</td>
- </tr>
- <tr>
- <td colspan="2">
- <input type="text" style="width:100%; box-sizing:border-box;" value="Your answer is still not correct, and you have exhausted all your attempts. (Rationale)">
- </td>
- </tr>
- </table>
- <button onclick="copyTable()">Copy</button>
- <script>
- function copyTable() {
- // get the table element
- var table = document.querySelector("table");
- // create a copy of the table
- var tableCopy = table.cloneNode(true);
- // insert the copy after the original table
- table.parentNode.insertBefore(tableCopy, table.nextSibling);
- // clear the input values in the copy
- var inputs = tableCopy.querySelectorAll("input");
- inputs.forEach(function(input) {
- input.value = "";
- });
- }
- </script>