* @copyright 2022 Bartolomé Sintes Marco * @license http://www.gnu.org/licenses/agpl.txt AGPL 3 or later * @version 2022-12-02 * @link https://www.mclibre.org * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ // Nos unimos a la sesión session_name("memorion-5"); session_start(); // Si no están definidas las variables de sesión, redirigimos a la segunda página if (!isset($_SESSION["numeroDibujos"]) || !isset($_SESSION["dibujos"]) || !isset($_SESSION["lado"]) || !isset($_SESSION["primera"]) || !isset($_SESSION["segunda"]) || !isset($_SESSION["jugadas"])) { header("Location:memorion-5-2.php"); exit; } ?> Memoríón (5). Memorión. Sesiones. Ejercicios. PHP. Bartolomé Sintes Marco. www.mclibre.org

Memorión (5)

\n"; // Mostramos los dibujos seleccionados en botones for ($i = 0; $i < 2 * $_SESSION["numeroDibujos"]; $i++) { // La ficha puede estar boca arriba (se ve el dibujo del animal) ... if ($_SESSION["lado"][$i] == "dibujo") { print " \n"; } else { // ... o boca abajo (se ve el dibujo del dorso) print " \n"; } } print "

\n"; print "\n"; // Mostramos el número de jugadas realizadas print "

Jugadas realizadas: $_SESSION[jugadas]

\n"; ?>