Hi guys

This for a location and sub location dropdown box

The first box is populated from the database but what I want to do is populate the sub location box via cat_id box. This is all setup in the database
but i'm not quite sure why it isn't working

Any help I would be very thankful


PHP Code:
$quer2=mysql_query("SELECT DISTINCT location,cat_id FROM location order by location"); 
$quer=mysql_query("SELECT DISTINCT sublocation FROM sublocation where cat_id=$quer2 order by sublocation");

if(isset(
$_GET['countryCode'])){
  
  switch(
$_GET['countryCode']){
   

 {case 
"$quer2":
      echo 
"obj.options[obj.options.length] = new Option('"$quer"','+1');\n";}

      
      break; 




  }  
}

?>