What I'm thinking of actually is the following: I want to have a drop-down displayed, after which I select some option, I want to run a Php that generates the options (by SQL) for a second drop-down that will appear after the first.
Asked
Active
Viewed 1,627 times
1
-
2you can achieve this by using ajax – Code Prank Mar 01 '12 at 12:05
-
it's all about simple ajax functionality my friend. – joakimdahlstrom Mar 01 '12 at 12:06
3 Answers
4
You could use jquery's load method which will fetch the results returned by php which in this case would be some html markup and display it in whatever div.
$('#container').load( 'phpsript.php' );

SS44
- 837
- 2
- 10
- 26
0
You can use Ajax to call php script with selected option that would return a list of available options for second dropdown. You can either use JSON or XML for returning the data.

Community
- 1
- 1

Husain Basrawala
- 1,757
- 15
- 21
0
if you want it like from the selection of first dropbox, second drop box should be dynamically generated, you should go for ajax or jquery ajax.
refer this like .. this will help you.. http://www.w3schools.com/ajax/tryit.asp?filename=tryajax_database

Rukmi Patel
- 2,619
- 9
- 29
- 41