bang kenapa fungsi validasi semester tidak berjalan, sedangkan prodi dan tahun berfungsi..
ini form'y
<?php
session_start();
?>
<script language="javascript">
function validasi(form1){
if (form1.PRODI.value == ""){
alert("Anda belum memilih Programstudi.");
return (false);
}
if (form1.KDSEMES.value == ""){
alert("Anda belum memilih semester.");
return (false);
}
if (form1.tahun.value == ""){
alert("Anda belum memilih tahun.");
return (false);
}
return (true);
}
</script>
<h3 align="center"></h3>
<form name="form1" method="post" action="admin.php?hal=carikrstotal" enctype="multipart/form-data" onSubmit="return validasi(this)">
<? // echo $_server['php_self'];?>
<table><tr><td><b>Cari :</td>
<td>Program Studi:</td> <td><select name="PRODI" id="PRODI">
<option value="">-----</option>
<? $kdsem = mysql_query("SELECT *from prodi ");
while($s=mysql_fetch_array($kdsem)){
echo "<option value=$s[KDPRODI]>$s[PRODI]</option>";
}
?> </select></td>
<option></option>
<td>Semester/periode:</td>
<td><select name="KDSEMES" id="KDSEMES">
<option value=" ">-----</option>
<?
$sem=mysql_query("select * from semester ");
while ($rs=mysql_fetch_array($sem)){
echo "<option value=$rs[KDSEMES]>$rs[SEMES]</option>";
}
?> </select>
</td>
<td>Tahun:</td> <td><select name="tahun" id="tahun">
<option value="">-----</option>
<?
$kdtahun = mysql_query("SELECT *from tahun ");
while($r=mysql_fetch_array($kdtahun)){
echo "<option value=$r[idthn]>$r[tahun]</option>";
}
?> </select></td>
<option></option>
<td> <input type="submit" value="Search" name="search"/></td><p>
</form></table>