We help IT Professionals succeed at work.
Get Started

Missing $_POST element.

Last Modified: 2019-12-06
When form is re-submitted via JavaScript on another page, one (and maybe more, I haven't looked) of the $_POST values is missing.  Many others do exist.

A text box with the same name/id as the requested $_POST element exists on the submitted form (I've verified the name/id.) and that text box contains text, but PHP is throwing an "Undefined index:" error when I do a "$v = $_POST['xx']".  I did a dump of the $_POST elements and it is not there.

If, however, I re-submit from the form itself (not from another open page), that $_POST value DOES exist.

As a note, there are over 100 fields on the re-submitted page.  Don' t know if this would affect it, or not.

Has anyone heard of this behavior and, if so, how to correct?


JavaScript that submits page. It is on the active window, function is called by a button click:

function CloseIt()
	if (!(window.opener.document.adiApproveOrder == undefined) 
	 && !(window.opener.document.adiApproveOrder.closed)) {
		var actn = document.getElementById("action").value;
		if (actn == "approved") {
			window.opener.document.adiApproveOrder['action'].value = "deliver";
		} else if (actn == "submitted") {
			window.opener.document.adiApproveOrder['action'].value = "submitted";
		} else {
			window.opener.document.adiApproveOrder['action'].value = "";

Open in new window

Watch Question
This problem has been solved!
Unlock 1 Answer and 9 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