There are three main approaches used to solve this problem.
The first is to use hidden form elements
Code: Select all
<input type="hidden" name="bob" value="My Value"/>
This works well for simple issues like if you are simply breaking the form into a few smaller pages for an easier UI for the user.
However this also means that if the browser crashes all data is lost.So the second approach is to place the data into the session. This keeps the data alive a bit longer and with say a login script the information does not need to be entered every time.
If the browser is closed the session can die and the data can be lost.
The third approach is to make the user register and log in and to use sessions to track the user ID. In this way data is saved to a database each time the form is submitted. Users can leave the form process half done and come back later to finish.