<?
	$seleksi = "";

if (isset($_POST['cta']))
{
   $ta = $_POST['ta'];
   if (empty($seleksi))
   {
		$seleksi .= "ta LIKE '%$ta%'";
   }
}

if (isset($_POST['cprodi']))
{
   $prodi = $_POST['prodi'];
   if (empty($seleksi))
   {
		$seleksi .= "prog_study LIKE '%$prodi%'";
   }
   else
   {
        $seleksi .= " AND prog_study LIKE '%$prodi%'";
   }
}
if (isset($_POST['cgel']))
{
   $gel = $_POST['gel'];
   if (empty($seleksi))
   {
		$seleksi .= "gel LIKE '%$gel%'";
   }
   else
   {
        $seleksi .= " AND gel LIKE '%$gel%'";
   }
}

if (isset($_POST['cno_cmhs']))
{
   $no_cmhs = $_POST['no_cmhs'];
   if (empty($seleksi))
   {
		$seleksi .= "no_cmhs LIKE '%$no_cmhs%'";
   }
   else
   {
        $seleksi .= " AND no_cmhs LIKE '%$no_cmhs%'";
   }
}
?>