0

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.

Edited by morteza_ipo: n/a

4
Contributors
7
Replies
9
Views
5 Years
Discussion Span
Last Post by morteza_ipo
0

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.

0

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

0

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

Thanks for helping.

Edited by morteza_ipo: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.