I am trying to create a routine where the $_Post values from my form are posted into a list of session variables.
I am aware that this can be done manually by doing the following:
session_start();
$_SESSION['value'] = $_POST['value'];
$_SESSION['value2'] = $_POST['value2'];
$_SESSION['value3'] = $_POST['value3'];
But as my form has a varying number of fields that change depending on previous selections made, I need to create a loop that will automatically generate and register my $_Post values in the session?
Can anyone help with this?