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

Recording form variables

I've got three forms with lots of fields on them. What happens is the visitor fills out form one, then two, then when the third one is submitted it will fire an email off with all the data that has been submitted.

So, I have to pass the data between forms and I was just about to create a hidden field in form2 for all the variables passed from form1 when I thought "This is bonkers, there are about 30 of them, there must be an easier way?".

Is there an easier way?
1 Solution
You can try and use sessions. That would be the easiest way to go.

sessions is a very good thing to do, here is a sample code
foreach ($_POST as $key => $value){

// retreval of stored form variables
foreach ($_SESSION['formVariables'] as $key => $value){
echo "$key = $value<br>";

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.

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