phymelx 09:27:10 | ///////// Getting the data from Mysql table for first list box////////// $quer2=mysql_query("SELECT DISTINCT reg_name,reg_id FROM region order by reg_name"); ///////////// End of query for first list box//////////// /////// for second drop down list we will check if category is selected else we will display all the subcategory///// $cat=$_GET['cat']; // This line is added to take care if your global variable is off if(isset($cat) and strlen($cat) > 0){ $quer=mysql_query("SELECT DISTINCT candm_name,candm_id FROM candm where reg_id=$cat order by candm_name"); }else{$quer=mysql_query("SELECT DISTINCT candm_name,candm_id FROM candm order by candm_name"); } ////////// end of query for second subcategory drop down list box /////////////////////////// /////// for Third drop down list we will check if sub category is selected else we will display all the subcategory3///// $cat3=$_GET['cat3']; // This line is added to take care if your global variable is off if(isset($cat3) and strlen($cat3) > 0){ $quer3=mysql_query("SELECT DISTINCT brgy_name FROM brgy where candm_id=$cat3 order by brgy_name"); }else{$quer3=mysql_query("SELECT DISTINCT brgy_name, brgy_id FROM brgy order by brgy_name"); } ////////// end of query for third subcategory drop down list box /////////////////////////// my 2nd dropdown box without data and my third dropdown always have a data..please help..thanks |
smo1234 09-27-2010 | It is difficult to say like this. Check your all variables are available for second query or not. You may have to print out the query and see. You can read the FAQ of drop down list box to get some idea. |
phymelx 09-27-2010 | thanks problem solved..thanks..why in my table the numbers are appearing not the name looks like this (1.11.1) in my table how do i change that into name?? |