如何在隐藏表单上点击“上一步”按钮后保留复选框值?

I am creating a form where users can select products, enter their contact data and afterwards receive a confirmation.

My PHP script consists of 3 pages. On the first page I have the contact data and the product selection, on the second I placed the code for an "overview", so the customer can check again, if his order is selected correctly and on the third and last page there you can find the confirmation.

My issue: on the second page I've made a hidden form, to keep the values from the first page (product, contact data). The products are selectable via checkbox. But how can I keep those checkbox values, when the customer clicks on "preview" button (if he's not confident with his choice and if he wants to edit it)?

Simply use session variables to catch the selected products on the first page and make them available on the second page as well.