您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <title>Difficulty</title>
  8. </head>
  9. <body>
  10. <form method="POST" action="#">
  11. <div class="input-group">
  12. <p>Select your difficulty</p>
  13. <label>Difficulty</label>
  14. <br>
  15. <input type="radio" name="difficulty" id="Easy" value="Easy" checked>
  16. <label for="Easy">Easy</label>
  17. <br>
  18. <input type="radio" name="difficulty" id="Normal" value="Normal">
  19. <label for="Normal">Normal</label>
  20. <br>
  21. <input type="radio" name="difficulty" id="Hard" value="Hard">
  22. <label for="Hard">Hard</label>
  23. <br>
  24. <input type="submit" name="submit" id="submit" value="Submit">
  25. </div>
  26. </form>
  27. </body>
  28. </html>
  29. <?php
  30. session_start();
  31. if (isset($_POST['submit'])) {
  32. $_SESSION['gaming'] = true;
  33. $_SESSION['difficulty'] = $_POST['difficulty'];
  34. header("Location: game.php");
  35. }
  36. ?>