hercioneto

Exercicio 4 - index,php

Apr 8th, 2019
274
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.69 KB | None | 0 0
  1. <!-- index.php -->
  2. <!DOCTYPE html>
  3. <html>
  4. <head>
  5.     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  6.     <title>Formulário Dados</title>
  7. </head>
  8. <body>
  9.     <form action="calcularSetores.php" method="POST">
  10. <?php for ($x=1; $x <= 2; $x++) {
  11.     ?>
  12. <div>Setor <?php echo $x; ?></div>
  13.  
  14. <?php for ($i=1; $i <= 2; $i++) {
  15.    
  16.     ?>
  17. <div>Nome <?php echo $i; ?>: <br><input type="text" name="nome<?php echo $i; ?>_S<?php echo $x; ?>"></div>
  18.  
  19. <div>Horas trabalhadas <?php echo $i; ?><br><input type="text" name="horas<?php echo $i; ?>_S<?php echo $x; ?>"></div>
  20. <?php } ?>
  21. <div><hr></div>
  22. <?php } ?>
  23. <div><input type="submit" name="enviar" value="Enviar"></div>
  24. </form>
  25. </body>
  26. </html>
Advertisement
Add Comment
Please, Sign In to add comment