Hi everybody.
I have 2 selects tag. first select is country list.
when user choses favorite country then the second select tag get new contents.

I can make this with javascript but I wanna make this just with php and without any scripts!

This is possible make this without any refreshing and reloading page? how?

Thanks for helping.

You could look at doing this using Ajax. This would mean a combination of Javascript and PHP though. Listen to the onchange event of the country list box, triggering the PHP script to run using Ajax and then processing the response using Javascript. The processing the response being populating the second list box.

This way, the page won't need to be reloaded.

Member Avatar

diafol

You can't get the changed value of a dropdown in php unless you submit the form as you need to involve the server for php to run. You can use ajax (js/php/xml etc) or js

Member Avatar

diafol

SOlved?

No with pure php but I should to use js & php with together!

Thanks for helping.