Skip to content

Instantly share code, notes, and snippets.

@thuan1412
Created October 8, 2021 03:05
Show Gist options
  • Save thuan1412/65f4535e67373ee11a6be9a5b4fbf5af to your computer and use it in GitHub Desktop.
Save thuan1412/65f4535e67373ee11a6be9a5b4fbf5af to your computer and use it in GitHub Desktop.
<!-- <?php
require 'students.php';
$students = get_all_students();
disconnect_db();
?> -->
<!DOCTYPE html>
<html>
<head>
<title>Danh sách cong ty</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>Danh sach cong ty</h1>
<a href="them-congty.php">Thêm congty</a> <br/> <br/>
<table width="100%" border="1" cellspacing="0" cellpadding="10">
<tr>
<td></td>
<td>Ma cong ty</td>
<td>Ten cong ty</td>
<td>Dia chi</td>
<td>Dien thoai</td>
<td>Email</td>
<td>Nam ThanhLap</td>
<td>Giam Doc</td>
<td>Linh Vuc Hoat Dong</td>
</tr>
<?php foreach ($students as $item){ ?>
<tr>
<td><?php echo $item['maCongTy']; ?></td>
<td><?php echo $item['tencty']; ?></td>
<td><?php echo $item['diachi']; ?></td>
<td><?php echo $item['dienThoai']; ?></td>
<td><?php echo $item['email']; ?></td>
<td><?php echo $item['namtlap']; ?></td>
<td><?php echo $item['giamdoc']; ?></td>
<td><?php echo $item['linhvuc']; ?></td>
<td>
<form method="post" action="student-delete.php">
<input onclick="window.location = 'student-edit.php?SoHoSo=<?php echo $item['SoHoSo']; ?>'" type="button" value="Sửa"/>
<input type="hidden" name="SoHoSo" value="<?php echo $item['SoHoSo']; ?>"/>
<input onclick="return confirm('Bạn có chắc muốn xóa không?');" type="submit" name="delete" value="Xóa"/>
</form>
</td>
</tr>
<?php } ?>
</table>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment