php - How would you save form info when reloading a web page?

one text

Solution:

You need to use $_SESSION to do this. Is not a good idea POST every request in body you passcode. Session is easy to use, you need to start in EVERY page of php where you need session variable, with session_start(). After starting the session you can read, insert, edit, delete a session variable.

Set variable: $_SESSION['passcode'] = $_POST['session'];

Read variable: echo $_SESSION['passcode'];

You can protect your area with a check if is set this session variable $_SESSION['passcode']

Source