Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $actualGrade = intval($_GET['grade']) ?? 3;
- ?>
- <!doctype html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <title></title>
- </head>
- <body>
- <form>
- <?php foreach (range(1, 5) as $grade): ?>
- <input type="radio"
- name="grade"
- <?= $grade === $actualGrade ? 'checked' : ''; ?>
- value="<?= $grade ?>" />
- <?= $grade ?>
- <?php endforeach; ?>
- </form>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement