Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- form1.php
- ###########
- <form action="form2.php" method="POST">
- <select name="userid">
- <option value="1">User 1</option>
- <option value="2">User 2</option>
- <option value="3">User 3</option>
- </select>
- <input type="submit" name="submit" value="Submit">
- </form>
- form2.php
- ###########
- <?php if (ISSET($_POST['submit']) && !empty($_POST['userid'])): ?>
- <html>
- <body>
- <form action="form3.php" method="POST">
- <input type="hidden" name="userid" value="<?= $_POST['userid'];?>">
- <input type="text" name="your_other_input[]">
- <input type="text" name="your_other_input[]">
- <input type="text" name="your_other_input[]">
- <input type="submit" name="submit" value="Submit">
- </form>
- </body>
- </html>
- <?php else: ?>
- <?php exit(header("location: form1.php")); ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement