How to pass all form field values into a session variable array

I wanted to pass all the form values for later use.

For example, I have the following form values "contact", "company", "address"

What is the easiest way to pass these into one array, and to recall them later.  I am quite new to this.
Who is Participating?
From your other question I see you're using sessions. If it's for this purpose you want to save them you can use session variables:
$_SESSION['address'] = $_POST['address'];
$_SESSION['company'] = $_POST['company'];

later you can just call $_SESSION['address'] again to get the value for that sesion
debbieau1Author Commented:
Wow thanks for that quick response!  I wasn't sure if there if was a way to group them all.  Say "companyinfo" then recall them individually on the pages where they are needed.    It sounds like there isn't.

Thank you

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.