<html>
<body>
<h3 align="center" style="background-color:#00FF00">:: FORM EDIT CMHS ::</h3>
<?php
include "connect.php";
$id=$_GET['id'];
$update = "select * from cmhs where id_daf ='$id'";
$hasil = mysql_query($update);
$row=mysql_fetch_array($hasil);

?>
<form method = post action ="editcmhs.php" enctype="multipart/form-data">
<table border =0 align="center" width="1000" bgcolor="#FFFFCC">
<tr><td>Id Daftar </td>
<td>: <input type = text name="id_daf" size="50" value="<? echo $id; ?>" readonly="yes"></td></tr>
<tr><td>Tgl Daftar </td>
<td>: <input type = text name="tgl_daf" size="50" value="<? echo $row[1]; ?>"></td></tr>
<tr><td>No Peserta </td>
<td>: <input type = text name="no_cmhs" size="50" value="<? echo $row[2]; ?>"></td></tr>
<tr><td>Nama </td>
<td>: <input type = text name="nm_cmhs" size="50" value="<? echo $row[3]; ?>"></td></tr>
<tr><td>Tempat lahir </td>
<td>: <input type = text name ="kota_lhr" size="50" value="<? echo $row[4]; ?>"></td></tr>
<tr><td>Tanggal Lahir </td>
<td>: 
<input type="text" name="tgl_lhr" value="<? echo $row[5]; ?>"id="tgl_lhr" style="background-color:#CCFFFF "/>
<input type="button" value="" style="background-image:url(cal.gif); background-repeat:no-repeat; background-position:center; border:none;" onClick="pick('tgl_lhr');" />
<script type="text/javascript" language="javascript">
<!--
function pick(tgt)
{
 window.open("kalender_pick.php?rand="+Math.random()+"&tgt="+tgt,"Kalender","width=500,height=400,alwaysRaised=yes,scrollbars=yes,directories=no,location=no,menubar=no,toolbar=no");
}
//-->
</script>
</td></tr>
<tr><td>Agama </td>
<td>: <select size="1"  name ="agama">
	<option selected><? echo $row[6]; ?></option>
	<option>Islam</option>
	<option>Katolik</option>
    <option>Kristen</option>
    <option>Hindu</option>
    <option>Budha</option>
</td>
  </select></td></tr>
<tr><td>Jenis Kelamin </td>
<td>: <select size="1"  name ="jenkel">
	<option selected><? echo $row[7]; ?></option>
	<option>L</option>
	<option>P</option>
</td>
  </select></td> </tr>   
<tr><td>Tinggi Badan</td>
<td>: <input type = text name ="tbadan" value="<? echo $row[8]; ?>">
Cm</td>
</tr>
<tr><td>Berat Badan</td>
<td>: <input type = text name ="bbadan" value="<? echo $row[9]; ?>">
Kg</td>
</tr>
<tr><td>Alamat</td>
<td>: <textarea name ="alamat"><? echo $row[10]; ?></textarea></td></tr>
<tr><td>Telpon / HP</td>
<td>: <input type = text name ="telp" value="<? echo $row[11]; ?>"></td></tr>
<tr><td>Sekolah Asal</td>
<td>: <input type = text name ="sklh_asal" size="50" value="<? echo $row[12]; ?>"></td></tr>
<tr><td>Rekomendasi</td>
<td>: <input type = text name ="rekomendasi" size="50" value="<? echo $row[13]; ?>"></td></tr>
<tr><td>Orang Tua/Wali</td>
<td>: <input type = text name ="wali" size="50" value="<? echo $row[14]; ?>"></td></tr>
<tr><td>Program Study </td>
<td>: <select size="1"  name ="prog_study">
	<option selected><? echo $row[15]; ?></option>
	<option>AKBID</option>
	<option>AKPER</option>
</td>
  </select></td> </tr>
<tr><td>TA.</td>
<td>: <input type = text name ="ta" value="<? echo $row[17]; ?>"></td></tr>
<tr><td>Keterangan </td>
<td>: <select size="1"  name ="ket">
	<option selected><? echo $row[18]; ?></option>
	<option>SL</option>
	<option>TL</option>
	<option>L</option>
</td>
  </select></td> </tr>
<tr><td>Foto</td>
<tr><td><? echo "<img src=photo.php?id=$row[id_daf] width=150 />"; ?></td></tr>
<tr><td><input type=submit value ="Update"></td></tr>
</table>
</form>
</body>
</html>

