<script type="text/javascript">
$(document).ready(function() {
    $(function() {
        $("#theList tr:even").addClass("stripe1");
        $("#theList tr:odd").addClass("stripe2");

        $("#theList tr").hover(
            function() {
                $(this).toggleClass("highlight");
            },
            function() {
                $(this).toggleClass("highlight");
            }
        );
    });	
});
</script>

<?php
include '../../inc/inc.koneksi.php';

$cari= $_GET['cari'];

echo "<table id='theList' width='100%'>		
		<tr>
			<th>No.</th>
			<th>Kode</th>
			<th>Nama Dokter</th>
			<th>Spesialis</th>
			<th>Alamat</th>
			<th>Nomor HP</th>
		</tr>";
		if(!empty($cari))
			$sql= "SELECT * FROM dokter WHERE (nama LIKE '%$cari%') ORDER BY kode_dt";
		else
			$sql= "SELECT * FROM dokter ORDER BY kode_dt";
		$query = mysql_query($sql);
		
		$no=1;
		while($r=mysql_fetch_array($query)){
			echo "<tr>
				<td align='center'>$no</td>
				<td>$r[kode_dt]</td>
				<td>$r[nama]</td>
				<td>$r[spesialis]</td>
				<td>$r[alamat]</td>
				<td>$r[nohp]</td>
			</tr>";
			$no++;
		}
	echo "</table>";
?>