Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <title>Formularz</title>
- <meta charset="UTF-8">
- </head>
- <body>
- <form method="POST" action="strona.php">
- Wiersz: <input type="text" name="row"><br>
- Kolumna: <input type="text" name="col"><br>
- <button type="submit">WyΕlij</button>
- </form>
- <?php
- $row = isset($_POST["row"])?$_POST["row"]:"";
- $col = isset($_POST["col"])?$_POST["col"]:"";
- echo "<table>";
- for ($i=1; $i<=$row; $i++)
- {
- echo "<tr>";
- for ($j=1; $j<=$col; $j++)
- echo '<td>'.$i*$j.'</td>';
- echo "</tr>";
- }
- echo "</table>";
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement