<?php
include "koneksi.php";
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>PENCARIAN SEDERHANA</title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
}
body {
background-color: #0C6D9C;
}
-->
</style></head>
<body>
<table width="674" border="0" align="center" cellpadding="3" cellspacing="3" color="#11A2E8">
<tbody><tr>
<td bgcolor="#D6EFFC"><p align="center">
<strong>PENCARIAN SEDERHANA BERDASARKAN NAMA</strong></p>
<form id="form1" name="form1" method="post" action="">
<div align="center">
<input name="cari" type="text" id="cari" size="50">
<input type="submit" name="Submit" value="Pencarian">
</div>
</form> <br><br>
<?php
$cari=$_POST['cari'];
if(!empty($cari)){
?>
<p align="center"><strong>HASIL PENCARIAN</strong></p>
<p>
<?php
$lispendaftar=mysql_query("SELECT * FROM data WHERE user LIKE '%$cari%'");
$totalseluruhpendaftar=mysql_num_rows($lispendaftar);
if($totalseluruhpendaftar=='0'){
echo "</p><center><blink>Maaf Data yang anda cari tidak ada di dalam database</blink>center>";
} else {
echo "Jumlah Seluruh Data yang ditemukan Adalah <b>".$totalseluruhpendaftar."</b> Data";
}
while($lispendaftar1=mysql_fetch_array($lispendaftar)){
?>
<table width="98%" border="0" align="center" cellpadding="3" cellspacing="1" color="#D78EFA">
<tbody><tr>
<td align="center" valign="middle" bgcolor="#F0D7FD"><strong>HOST</strong></td>
<td align="center" valign="middle" bgcolor="#F0D7FD"><strong>USER</strong></td>
<td align="center" valign="middle" bgcolor="#F0D7FD"><strong>PASSWORD </strong></td>
<td align="center" valign="middle" bgcolor="#F0D7FD"><strong>TANGGAL MASUK</strong>td>
<td align="center" valign="middle" bgcolor="#F0D7FD"><strong>TANGGAL HABIS</strong></td>
</tr><tr>
<td bgcolor="#FFFFFF"><?php echo $lispendaftar1['host']?></td>
<td bgcolor="#FFFFFF"><?php echo $lispendaftar1['user']?></td>
<td bgcolor="#FFFFFF"><?php echo $lispendaftar1['passwrd']?></td>
<td bgcolor="#FFFFFF"><?php echo $lispendaftar1['waktu_masuk']?></td>
<td bgcolor="#FFFFFF"><?php echo $lispendaftar1['waktu_habis']?></td>
</tr></tbody></table>
<p></p>
<?php }} ?>
</td>
</tr>
</tbody></table>
</body>
</html>