page3_form.php
php
<?php
//Session starts here
session_start();
?><!DOCTYPE HTML>
<html>
<BODY>
<head>
<title>Vícestránkový formulář</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<div class="container">
<div class="main">
<h2>IQ test 24</h2><hr/>
<span id="error">
<!----Initializing Session for errors--->
<?php
if (!empty($_SESSION['error'])) {
echo $_SESSION['error'];
unset($_SESSION['error']);
}
foreach ($_POST as $key => $value) {
$_SESSION['post'][$key] = $value;
}
?>
</span>
<form action="page4_insertdata.php" method="post">
<?php
// Otazka 2
$pocetTabulek2 = 3;
$cisloTabulky2 = rand(1, $pocetTabulek2); // Vybira nahodne otazky od 1 do 3
$cestaKVybraneTabulce2 = sprintf('%s/qA02_%s.php', __DIR__, $cisloTabulky2);
include $cestaKVybraneTabulce2;
?>
<input type="reset" value="Reset" />
<input type="submit" value="Potvrď" />
</form>
</div>
</div>
</body>
</html>
Neformátovaný
Přidáno: 29.1.2017
Expirace: Neuvedeno