# Saved sessions when logged out

**URL:** <https://www.phphelp.com/t/saved-sessions-when-logged-out/35994>\
**Category:** Uncategorized\
**Created:** [January 26, 2024, 9:30pm UTC](https://www.phphelp.com/t/saved-sessions-when-logged-out/35994 "2024-01-26T21:30:55Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![phdr](https://www.phphelp.com/letter_avatar_proxy/v4/letter/p/91b2a8/32.png) [@phdr](https://www.phphelp.com/u/phdr)\
**Post date:** [January 26, 2024, 10:57pm UTC](https://www.phphelp.com/t/saved-sessions-when-logged-out/35994/2 "2024-01-26T22:57:19Z")

</div>

If this data can be entered across multiple sessions, on different devices, or by different people, then yes, store the data in a database with a status value that indicates it is incomplete. When all the data has been entered and is finally ‘submitted’ just change the status to a value that indicates it is complete.

In your previous thread, both of the forum members that replied suggested/showed using array names for the form fields and dynamically producing that many repetitive form fields. Using array names will let you simply loop to process the data and dynamically producing the form fields will save the time it takes to write out (or change) 66 sets of code.

Since you now have a need to repopulate form field values -

> [@Popup css modal on form input](https://www.phphelp.com/t/popup-css-modal-on-form-input/35974/2):
>
> The form fields should also be ‘sticky’ and repopulate the field values with any existing data, in case there is a validation error (or **later when you are editing existing data**.)

dynamically producing them will allow you to make any changes in a single place.

---

_[View the full topic](https://www.phphelp.com/t/saved-sessions-when-logged-out/35994)._
