Skip to content
Advertisement

PHP and 2 lists, why the $_POST() is not using the name tag…?

I’m trying to use the following code (https://codepen.io/enogrob/pen/OwjrGy) in my form and running into an issue with the $_POST() not pulling the name”” tag, it references the value”” tag which in this case isn’t helpful.

The 1st SELECT:

JavaScript

The select code looks like this:

JavaScript

and the java script implementation like this:

JavaScript

Is there a way to fix this or is there a better way to drive a second select from another ??

Advertisement

Answer

I solved this problem by creating a custom attribute on the 2nd SELECT combined with a hidden input using the following:

JavaScript

and the script that goes with it:

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement