$ip = mysql_query("select * from nilai WHERE kode1 = '$_SESSION[kode1]'");
$l = mysql_fetch_array($ip);
$ipnya = $l['IPS'];
if($ipnya>=3){
$sks_dptdiambil="24 sks";
}
elseif($ipnya>=2.5 and $ipnya<3){
$sks_dptdiambil="21 sks";
}
elseif($ipnya>=2 and $ipnya<2.5){
$sks_dptdiambil="18 sks";
}
elseif($ipnya>=1.5 and $ipnya<2){
$sks_dptdiambil="15 sks";
}
else{
$sks_dptdiambil="12 sks";
}
if($jum==0){
echo "<script>alert('Maaf, mohon lengkapi input yang tersedia !');history.go(-1);</script>";
}
if( $jum < $sks_dptdiambil) {
echo "<script>alert('Maaf, mohon kurangi $sks_dptdiambil!');history.go(-1);</script>";
}