<?php
function AutoIdarea($sess_autonumm)//ËÁÒÂàÅ¢àÍ¡ÊÒÃ
	{
		$a="D";

                        $strSQL1 = "SELECT MAX(Id_dep) AS Id_dep FROM it_department WHERE Id_dep LIKE 'D%'";
                        $objQuery1 = mysqli_query($con,$strSQL1);
                        while($objResult1 = mysqli_fetch_array($objQuery1)){

                            $id=$objResult1["Id_dep"];
                            //echo $id;
                        }

                        $id++;
                        if($id==1){

                            //echo $id_t = "D".$sess_autonumm."00".$id;
                        }else if($id!=1){
                           // echo $id_t = $id;
                        }

	}	
?>