-
Notifications
You must be signed in to change notification settings - Fork 30
/
Copy pathindex.php
54 lines (48 loc) · 1020 Bytes
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
<!DOCTYPE html>
<html>
<head>
<title>Import Excel Ke MySQL dengan PHP - www.malasngoding.com</title>
</head>
<body>
<style type="text/css">
body{
font-family: sans-serif;
}
p{
color: green;
}
</style>
<h2>IMPORT EXCEL KE MYSQL DENGAN PHP</h2>
<h3>www.malasngoding.com</h3>
<?php
if(isset($_GET['berhasil'])){
echo "<p>".$_GET['berhasil']." Data berhasil di import.</p>";
}
?>
<a href="upload.php">IMPORT DATA</a>
<table border="1">
<tr>
<th>No</th>
<th>Nama</th>
<th>ALamat</th>
<th>Telepon</th>
</tr>
<?php
include 'koneksi.php';
$no=1;
$data = mysqli_query($koneksi,"select * from data_pegawai");
while($d = mysqli_fetch_array($data)){
?>
<tr>
<th><?php echo $no++; ?></th>
<th><?php echo $d['nama']; ?></th>
<th><?php echo $d['alamat']; ?></th>
<th><?php echo $d['telepon']; ?></th>
</tr>
<?php
}
?>
</table>
<a href="https://www.malasngoding.com/import-excel-ke-mysql-dengan-php">www.malasngoding.com</a>
</body>
</html>