ticallian
asked on
PHP:
How can i create an array containing all field names and values from a posted form.
I then need to save the array as a session for later use.
The code i have works for storing the field input names, just not their submitted values.
Thanks for any help
I then need to save the array as a session for later use.
The code i have works for storing the field input names, just not their submitted values.
Thanks for any help
$fields = array();
foreach ($_POST as $field => $value){
array_push($fields, $field);
}
$_SESSION['fields'] = $fields;
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks