$kolom=$_POST['kolom'];
$cari=$_POST['cari'];
$conn=mysql_connect("localhost","root","");
mysql_select_db("mahasiswa", $conn);
$hasil=mysql_query("select * from data_mahasiswa where $kolom like '%$cari%'",$conn);
$jumlah=mysql_num_rows($hasil);
echo"<br>";
echo"Ditemukan: $jumlah";
echo"<br>";
while($baris=mysql_fetch_array($hasil))
{
echo"nrp:";
echo $baris[0];
echo"<br>";
echo"nama:";
echo $baris[1];
echo"<br>";
echo"semester:";
echo $baris[2];
echo"<br>";
echo"jurusan:";
echo $baris[3];
}
?>
Tidak ada komentar:
Posting Komentar