Solved

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

Posted on 2004-10-27
197 Views
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.
0
Question by:debbieau1
    2 Comments
     
    LVL 3

    Accepted Solution

    by:
    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'];
    etc

    later you can just call $_SESSION['address'] again to get the value for that sesion
    0
     
    LVL 1

    Author Comment

    by:debbieau1
    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

    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Prepare to Pass the CompTIA A+ 900 Series Exam

    CompTIA aims to adapt its A+ Certification to reflect the most current knowledge and skills needed by today's IT professionals--and this year's 2016 exam is harder than ever. This certification is one of the most highly-respected and sought after in IT.

    Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
    This article will explain how to display the first page of your Microsoft Word documents (e.g. .doc, .docx, etc...) as images in a web page programatically. I have scoured the web on a way to do this unsuccessfully. The goal is to produce something …
    The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
    The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

    934 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

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now