| Server IP : 27.254.66.5 / Your IP : 216.73.217.39 Web Server : Apache/2 System : Linux cs82.hostneverdie.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64 User : technic2 ( 1951) PHP Version : 7.4.30 Disable Function : apache_child_terminate, apache_setenv, define_syslog_variables, escapeshellarg, escapeshellcmd,exec, fp, fput, highlight_file, ini_alter, ini_restore, inject_code, passthru,phpAds_remoteInfo, phpAds_XmlRpc,phpAds_xmlrpcDecode, phpAds_xmlrpcEncode, popen, posix_getpwuid, posix_kill, posix_mkfifo, posix_setpgid, posix_setsid,posix_setuid, posix_setuid, posix_uname,proc_open,proc_close, proc_get_status, proc_nice, proc_terminate, shell_exec, syslog, system, xmlrpc_entity_decode, show_source,sleep,pcntl_exec,virtual,suexec,dbmopen,dl,symlink,disk_free_space,diskfreespace,leak MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /home/technic2/public_html/rytc/pta/ |
Upload File : |
<?php
@include('condb.php');
$sql = "SELECT * FROM pta_parent";
$result = $conn->query($sql);
?>
<!DOCTYPE html>
<html lang="th">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>สมาคมผู้ปกครองวิทยาลัยเทคนิคระยอง</title>
<link rel="stylesheet" href="css/insert.css">
<link rel="stylesheet" href="css/table.css">
<!-- Favicons -->
<link href="img/logo.png" rel="icon">
<link href="img/logo.png" rel="apple-touch-icon">
</head>
<body>
<header>
<?php @include('nav.php');?>
</header>
<br><br>
<div class="table-container">
<h1>ข้อมูลสมาชิก</h1>
<table>
<thead>
<tr>
<th>คำนำหน้า</th>
<th>ชื่อ</th>
<!--<th>บ้านเลขที่</th>
<th>หมู่</th>
<th>ถนน</th>
<th>ตำบล</th>
<th>อำเภอ</th>
<th>จังหวัด</th>
<th>รหัสไปรษณีย์</th> -->
<th>สถานที่ทำงาน</th>
<th>เบอร์โทรศัพท์</th>
<th>แก้ไข</th>
<th>จัดการนักเรียน</th>
<th>ลบ</th>
</tr>
</thead>
<tbody>
<?php
if ($result->num_rows > 0) {
// แสดงผลข้อมูลในตาราง
while ($row = $result->fetch_assoc()) {
echo "<tr>
<td>" . $row["p_prefix"] . "</td>
<td>" . $row["p_name"] . "</td>
<td>" . $row["p_work"] . "</td>
<td>" . $row["p_phone"] . "</td>
<td><a href='edit_data.php?id=".$row["p_id"]."'><button class='buttonA'>แก้ไข</button></a></td>
<td><a href='check_student.php?id=".$row["p_id"]."'><button>นักเรียน</button></a></td>
<td><a href='delete_data.php?id=".$row["p_id"]."'><button class='buttonB' onclick=\"return confirmAction('คุณต้องการลบข้อมูลนี้หรือไม่?');\">ลบ</button></a></td>
</tr>";
}
} else {
echo "<tr><td colspan='3'>ไม่พบข้อมูล</td></tr>";
}
?>
</tbody>
</table>
</div>
<script>
function confirmAction(message) {
return confirm(message);
}
</script>
</body>
</html>
<?php
// ปิดการเชื่อมต่อฐานข้อมูล
$conn->close();
?>