如何在没有ajax的同一个php中获取所选的下拉值[关闭]

I have 3 dependent dropdown which coded in php and to move on second dropdown i have to select the first dropdown.on the value of that first drop down it shows the value of second dropdown from the database.to show the database data in dropdown i need the selected value of firstdrop down.and it will use that value for select query like

("select id,name,city_id from tab WHERE city_id="$selectedvaluofdropdown).

Now the problem is i have to do this without redirecting the php page.and without using ajax or jquery.is it posible...

You can set all the available values of dropdowns ​​in the variable javascript them into json using json_encode. Then if you change the values ​​of the dependent change dropdown using js

Drop down selection happens on client side. PHPs job is over once the page is displayed. You have to use AJAX / JQuery to do something like this (without redirecting or reloading the page).

There is no way to call php scripts without reloading the php unless you use AJAX.