Hello. I have a Javascript that generates 2 conditional select tags. If condition in 1st is being selected , the 2nd select shows different options.
Here is an example :

case "events" :
document.formname.subcategory.options[0]=new Option("להקות והרכבים","");
document.formname.subcategory.options[1]=new Option("רביעיות כלי מיתר","");
document.formname.subcategory.options[2]=new Option("מעגלי מתופפים","");
document.formname.subcategory.options[3]=new Option("תקליטנים","");
document.formname.subcategory.options[4]=new Option("רקדנים ומופעי בידור","");
document.formname.subcategory.options[5]=new Option("קומיקאים","");

My quetsion is how do I pass each option in this select to a PHP $GET or POST variable ?

Member Avatar


For changing the 2nd option list following a selection of the 1st - you don't need php nor ajax, just js.

You only see $_GET or $_POST when you submit the form to the server (different or same page). If your 2nd dropdown HTML is updated by js, then no problems. That data is sent. I don't think your question makes sense in the terms of changes made to the page and data sent to the server.