954,597 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Dependent Combo in PHP

I'm stuck in a problem.. I want to use two combo let Country and City, where City list depends on the Country combo, How can I don do it with HTML and PHP only?

Thanks.

debayanmitra
Newbie Poster
8 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

If you want to change the cities when the country changes without reloading the page, then you need some javascript too.

pritaeas
Posting Expert
Moderator
5,484 posts since Jul 2006
Reputation Points: 653
Solved Threads: 875
 

see this if you want it in a static way:
http://www.weberdev.com/get_example-4398.html

see this if you want is from data base:
http://www.plus2net.com/php_tutorial/php_drop_down_list.php

or if you want it with out reloading page go for ajax.

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

No , I dont want to use ant JavaScript or Ajax code there, Only PHP and HTML.

debayanmitra
Newbie Poster
8 posts since Dec 2010
Reputation Points: 10
Solved Threads: 0
 

then try this:
see this if you want is from data base:
http://www.plus2net.com/php_tutorial..._down_list.php

Shanti C
Posting Virtuoso
1,642 posts since Jul 2008
Reputation Points: 137
Solved Threads: 162
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: