Advertisement
ivanov_ivan

SimpleHelp

Mar 8th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4.     <title>HTML Buttons</title>
  5. </head>
  6. <body>
  7. <form>
  8.     N:<input type="text" name="num"/>
  9.     <input type="submit" value="Submit"/>
  10. </form>
  11. <?php
  12. if (isset($_GET['num'])) {
  13.     $n = intval($_GET['num']);
  14.  
  15.     for ($i = 1; $i <= $n; $i++) { ?>
  16.         <button type='button'><?php echo $i ?></button>
  17.     <?php }
  18. }
  19. ?>
  20. </body>
  21. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement