Registration page with multiple pages

Hello

I am working on a registration page that contains multiple pages.

Each page is divided into three stages.

(First stage) -> (second stage) -> (third stage)

The third stage is where all the information is inserted into the mysql database.
How do I retrieve all the information inserted into stage 1 and 2, and bring it into stage 3?

Regards

You can store the information in hidden input fields as an array, just make sure you encrypt any vital information like passwords before its outputted to eliminate security holes. Eg:

<input type="hidden" name="reg_store[]" value="<?php echo $_POST['username']; ?>" />
<input type="hidden" name="reg_store[]" value="<?php echo sha1($_POST['password']); ?>" />

Hi thank you for your response. The only problem with this is (sorry forgot to mention this)

I have multiple buttons for the form, so this method won’t carry the data over because I am not using action .
I basically have an if statement that takes the button to a certain page depending on which button is pressed.

I would have thought storing data in a session would be ideal for this scenario.