Guest User

Untitled

a guest
Oct 21st, 2019
86
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <title>Formularz</title>
  4. <meta charset="UTF-8">
  5. </head>
  6. <body>
  7. <form method="POST" action="strona.php">
  8. Wiersz: <input type="text" name="row"><br>
  9. Kolumna: <input type="text" name="col"><br>
  10. <button type="submit">Wyślij</button>
  11. </form>
  12.  
  13. <?php
  14. $row = isset($_POST["row"])?$_POST["row"]:"";
  15. $col = isset($_POST["col"])?$_POST["col"]:"";
  16.  
  17. echo "<table>";
  18. for ($i=1; $i<=$row; $i++)
  19. {
  20. echo "<tr>";
  21. for ($j=1; $j<=$col; $j++)
  22. echo '<td>'.$i*$j.'</td>';
  23. echo "</tr>";
  24. }
  25.  
  26. echo "</table>";
  27.  
  28. ?>
  29.  
  30. </body>
  31. </html>
RAW Paste Data