Gestionnaire de fichiers - Editer - /home/webapp68.cm.in.th/u68319090015/app/show.php
Arrière
<br><br><br><br> <?php $sql = "SELECT * FROM user"; $result = $conn->query($sql); /* if ($result->num_rows > 0) { // output data of each row while($row = $result->fetch_assoc()) { echo "id: " . $row["uid"]. " - Name: " . $row["fullname"]. " " . $row["email"]. "<br>"; } } else { echo "0 results"; } $conn->close(); */ ?> <div class="container mt-3"> <h2>แสดงรายชื่อสมาชิก</h2> <?php if ($result->num_rows > 0) { ?> <a href="?page=regis" class="btn btn-success">เพิ่มข้อมูล</a> <table class="table table-hover table-bordered"> <thead> <tr> <th>ลำดับ</th> <th>ชื่อ นามสกุล</th> <th>เบอร์โทรศัพท์</th> <th>อีเมล์</th> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_login"]!=""){ ?> <th>จัดการ</th> <?php } ?> </tr> </thead> <tbody> <?php // output data of each row $no=1; //เริ่มต้นลำดับ while($row = $result->fetch_assoc()) { //echo "id: " . $row["uid"]. " - Name: " . $row["fullname"]. " " . $row["email"]. "<br>"; $uid=$row["uid"]; ?> <tr> <td><?php echo"$no"; ?></td> <td><?="$row[fullname]"?></td> <td><?php echo"$row[phone]"; ?></td> <td><?php echo"$row[email]"; ?></td> <?php if($_SESSION["login"]=="pass" and $_SESSION["uid_login"]!=""){ ?> <td> <a href="?page=edit&uid=<?=$uid?>" class="btn btn-primary">แก้ไข</a> <a href="?page=delete&uid=<?=$uid?>" class="btn btn-danger">ลบ</a> </td> <?php } ?> </tr> <?php $no++; } ?> </tbody> </table> <?php } ?> </div>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Génération de la page: 0.07 |
proxy
|
phpinfo
|
Réglages