Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- file1.php
- <form action="file2.php" method="POST">
- <input type="type" name="info">
- <input type="submit" name="submit_from_form1" value="submit">
- </form>
- file2.php
- if (isset($_POST['submit_from_form1'])) {
- $info = $_POST['info'];
- } else {
- // in case user access file2.php directly then redirect back to file1.php
- exit(header('location: file1.php'));
- }
- <form action="file3.php" method="POST">
- <input type="text" name="something">
- <input type="text" name="info" value="<?php echo $info; ?>">
- <input type="submit" name="submit_from_form2" value="submit">
- </form>
- file3.php
- if (isset($_POST['submit_from_form2'])) {
- $something = $_POST['something'];
- $info = $_POST['info'];
- // update your database
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement