• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 241
  • Last Modified:

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.
1 Solution
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


Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now