Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions BaiTap/Method/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

function sayHello($name) {
echo "Hello $name!";
}

?>

<html>
<head>
<title>Visual Studio Code Remote :: PHP</title>
</head>
<body>
<?php

sayHello('day la method 123456');

phpinfo();

?>
</body>
</html>
22 changes: 22 additions & 0 deletions BaiTap/TruyenNhanDuLieu/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

function sayHello($name) {
echo "Hello $name!";
}

?>

<html>
<head>
<title>Visual Studio Code Remote :: PHP</title>
</head>
<body>
<?php

sayHello('toi la tuan anh dep trai 123456');

phpinfo();

?>
</body>
</html>
Binary file added BaiTap/Week2/database.db
Binary file not shown.
43 changes: 43 additions & 0 deletions BaiTap/Week2/index.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Bảng Sinh Viên</title>
<link rel="stylesheet" href="style.css">
</head>
<body>

<table class="student-table">
<thead>
<tr>
<th>Mssv</th>
<th>Họ và Tên</th>
<th>Kỳ</th>
<th>Đăng Ký</th>
</tr>
</thead>
<tbody>
<?php
// Kết nối với cơ sở dữ liệu SQLite
$db = new SQLite3('C:\xampp\htdocs\WorkSpace6\vscode-remote-try-php\BaiTap\Week2\database.db');

// Truy vấn dữ liệu từ cơ sở dữ liệu
$query = $db->query('SELECT * FROM tblSinhVien');
while ($row = $query->fetchArray()) {
echo '<tr>';
echo '<td>'.$row['Mssv'].'</td>';
echo '<td>'.$row['HoTen'].'</td>';
echo '<td>'.$row['Ky'].'</td>';
echo '<td>'.$row['DangKy'].'</td>';
echo '</tr>';
}

// Đóng kết nối với cơ sở dữ liệu
$db->close();
?>
</tbody>
</table>

</body>
</html>
19 changes: 19 additions & 0 deletions BaiTap/Week2/style.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.student-table {
width: 100%;
border-collapse: collapse;
}

.student-table th,
.student-table td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}

.student-table th {
background-color: #f2f2f2;
}

.student-table tbody tr:nth-child(even) {
background-color: #f2f2f2;
}
Loading