mirror of
https://github.com/dyzulk/raisen-app.git
synced 2026-01-26 21:32:03 +07:00
first commit
This commit is contained in:
45
ajax/mahasiswa.php
Normal file
45
ajax/mahasiswa.php
Normal file
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
usleep(500000);
|
||||
require '../functions.php';
|
||||
|
||||
$keyword = $_GET["keyword"];
|
||||
|
||||
$query = "SELECT * FROM mahasiswa
|
||||
WHERE
|
||||
nama LIKE '%$keyword%' OR
|
||||
nrp LIKE '%$keyword%' OR
|
||||
email LIKE '%$keyword%' OR
|
||||
jurusan LIKE '%$keyword%'
|
||||
";
|
||||
$mahasiswa = query($query);
|
||||
?>
|
||||
<table border="1" cellpadding="10" cellspacing="0">
|
||||
|
||||
<tr>
|
||||
<th>No.</th>
|
||||
<th>Aksi</th>
|
||||
<th>Gambar</th>
|
||||
<th>NRP</th>
|
||||
<th>Nama</th>
|
||||
<th>Email</th>
|
||||
<th>Jurusan</th>
|
||||
</tr>
|
||||
|
||||
<?php $i = 1; ?>
|
||||
<?php foreach( $mahasiswa as $row ) : ?>
|
||||
<tr>
|
||||
<td><?= $i; ?></td>
|
||||
<td>
|
||||
<a href="ubah.php?id=<?= $row["id"]; ?>">ubah</a> |
|
||||
<a href="hapus.php?id=<?= $row["id"]; ?>" onclick="return confirm('yakin?');">hapus</a>
|
||||
</td>
|
||||
<td><img src="img/<?= $row["gambar"]; ?>" width="50"></td>
|
||||
<td><?= $row["nrp"]; ?></td>
|
||||
<td><?= $row["nama"]; ?></td>
|
||||
<td><?= $row["email"]; ?></td>
|
||||
<td><?= $row["jurusan"]; ?></td>
|
||||
</tr>
|
||||
<?php $i++; ?>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</table>
|
||||
Reference in New Issue
Block a user