Store form data temporarily before writing to the database

3

How do I store data on a form temporarily before inserting into the bank? I have a form with a set of fields. After the user populates the field set, you have the option to add one more set with the same fields to insert new values. I would like to do the insertion in the bank only when the user completes the fill. Each set of fields must be a record in the table. How can I do this?

    
asked by anonymous 27.07.2015 / 15:37

1 answer

1

You can create an array in $ _SESSION and for each set you add a new index in the array. To do this, look for the size of the array e:

$_SESSION[$tamanho+1]['nome'] = $_POST['nome'];
    
27.07.2015 / 21:12