<?php
session_start();
include "Inc_db.php";
//error_reporting(E_ALL ^ (E_NOTICE | E_WARNING));
//$totalRow=0;
$sql= "SELECT student_nim, student_name, student_program FROM tb_student";
$result=mysql_query($sql);
$totalRow=mysql_num_rows($result);
?>
<html>
<head><title>Mahasiswa</title>
<link href="Bootstrap/css/bootstrap.css" rel="stylesheet">
<link href="Bootstrap/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
<h1><center><b>DATA MAHASISWA</b></center></h1>
<center><table border=1 width=75%></center>
<tr>
Keyword <br>
</tr>
<form action="" method="POST">
Nama:
<input type="text" name="frm_nama" />
NIM:
<input type="text" name="frm_nim" />
Prodi:
<select class="custom-select">
<option selected>--ALL--</option>
<option name="prodi" value="MI" name="frm_mi">D3 Manajemen Informatika</option>
<option name="prodi" value="SI" name="frm_si">SI Sistem Informasi</option>
<option name="prodi" value="TI" name="frm_ti">SI Teknik Informatika</option>
</select>
<input type="submit" name="frm_cari" value="Cari" class="btn btn-primary btn-sm" />
</form>
</br>
<?php
if(isset($_POST['frm_cari'])){
$var_name=$_POST['frm_nama'];
$var_nim=$_POST['frm_nim'];
$sql="SELECT student_nim, student_name, student_program FROM tb_student WHERE student_nim LIKE '%".$var_nim."%' AND student_name LIKE '%".$var_name."%'";
$result=mysql_query($sql);
$totalRow=mysql_num_rows($result);
}//-if $var_cari
else{
$sql=("SELECT * FROM tb_student") or die(mysql_error());
}
?>
<?php
echo "Jumlah data:$totalRow<br/>";
?>
<br>
<tr>
<td>NIM</td><td>Nama</td><td>Prodi</td><td>Aksi</td>
</br>
</tr>
<?php
if($totalRow==0){
?>
<tr><td colspan="4">Data belum tersedia</td></tr>
<?php
}
else {
while ($data=mysql_fetch_array($result)) {
$nim= $data['student_nim'];
$name= $data['student_name'];
$program= $data['student_program'];
?>
<tr>
<td><?php echo $nim ?></td>
<td><?php echo $name ?></td>
<td><?php echo $program ?></td>
<td><a href="Student_edit.php">Edit</a>
<a href="Student_delete.php">Hapus</a></br>
</tr>
<?php
} //-while
}
//}
?>
</table>
<form action="Student_insert.php" method="POST">
<tr>
<br>
<td><input type="submit" value="Tambah Data" class="btn btn-primary btn-sm"> </td>
</form>
<form action="Student.php" method="POST">
<input type="submit" value="Refresh" class="btn btn-primary btn-sm">
</br>
</tr>
</form>
</body>
</html>
I cleaned up your code.
You need to use triple backticks to post code to the forum.
See this post for details.