<!DOCTYPE html>
<html lang="pl">
<head>
  <meta charset="utf-8" />
  <link rel="stylesheet" href="style.css" />
  <title>PHP-36 form HTML5</title>
</head>
<body>
<h2>PHP-36 form HTML5</h2>
<form action="<?php print $_SERVER['SCRIPT_NAME']; ?>" method="post"> 
  Data: <input type="date" /><br />
  Email: <input type="email" /><br />
  Liczba: <input type="number" /><br />
  Zakres: <input type="range" min="1" max="12" /><br />
  <input type="submit" /> 
</form>
<hr />
<h3>Dane z formularza</h3>
<table>
<tbody>
<?php
  foreach($_POST as $klucz => $wartosc)
    {
    print "<tr><td>$klucz</td><td>";
    if(is_array($wartosc))
      {
      for($i=0; $i<count($wartosc); $i++) print "$klucz [$i] = $wartosc[$i]<br />";
      }
    else print $wartosc;
    print "</td></tr>\n";
    }
?> 
<br /><hr /><a href="list.php">Lista plików</a> &bull; <a href="source.php">Kod źródłowy</a> 
</body>
</html>
