0 and !is_numeric($cat)){ // to check if $cat is numeric data or not.
echo "Data Error";
exit;
}
///////// Getting the data from Mysql table for first list box//////////
$quer2="SELECT DISTINCT name_articletype,idarticletype FROM article_type";
///////////// 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/////
if(isset($cat) and strlen($cat) > 0){
$quer="SELECT DISTINCT idmodelarticle,modelarticle FROM modelarticle where idarticletype=$cat";
}else{$quer="SELECT DISTINCT idmodelarticle,modelarticle FROM modelarticle"; }
////////// end of query for second subcategory drop down list box ///////////////////////////
echo "";
?>
Reset and start again
PHP SQL HTML free tutorials and scripts