We help IT Professionals succeed at work.
Get Started

Passing $post data in php

breeze351 asked
Last Modified: 2016-03-27
This may be hard to follow.
I need to pass data from page to page.  Follow me on this:
Page 1: Keyin data for main record (this is where the 1st $post data comes from)
Page 2: If  certain check box is "N", go to page 5.
    Page 3:  Keyin more data.
    Page 4:  Write record and save new values for original record
Page 5: Write/Update main record

 I need to keep the $_POST data but it does not seem to work.
On page #2 when the check box is "Y", I tried
                $work = $_POST['Add_Name_1'];
                $_POST['Add_Name_1'] = $work;

But when I get to page #3, I get
Notice: Undefined index: Add_Name_1 in /home/langsyst/public_html/lansco/Contact_Insert.php on line 12
Line 12 is :
            echo "Post 1 = ".$_POST['Add_Name_1']."<br>";      

Watch Question
Fixer of Problems
Most Valuable Expert 2014
This problem has been solved!
Unlock 1 Answer and 6 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE