[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now


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

Posted on 2004-10-27
Medium Priority
Last Modified: 2006-11-17
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.
Question by:debbieau1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Accepted Solution

KvdnBerg earned 500 total points
ID: 12427587
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

Author Comment

ID: 12427639
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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Developers of all skill levels should learn to use current best practices when developing websites. However many developers, new and old, fall into the trap of using deprecated features because this is what so many tutorials and books tell them to u…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
Suggested Courses

650 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question