i have created a dropdown box by fetching values of categories from mssql database. so can anybody help me in doing this-> if i select any option from drop down menu it should directly to that particular page and should display all the values under that category. for eg if i select category india it should display all the states in india Himani
Add javascript code to your first drop-down menu like this: onChange="javascript: form.submit();" Code (markup): That probably doesn't work - you'll have to play around with it (javascript isn't my strong point). Then wherever the form submits to, put code like this: if($_GET["cat"]) { $query = "select col from (tablename) where category='" . $_GET['cat'] . "'"); while($row = mysql_fetch_object(mysql_query($query)) { echo "$row->col<br />"; } } PHP: Change "col" and "category" to the right names of course. But that code will output a simple list of whatever matches the category in the database. Once you get the data, then work on the formatting to fit your site.