File manager - Edit - /var/www/order.cmtc.ac.th/user/check_status_1.php
Back
<?php include('../config/db.php'); ?> <!DOCTYPE html> <html lang="th"> <head> <meta charset="UTF-8"> <title>ตรวจสอบสถานะการจอง</title> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css" rel="stylesheet"> <link href="../assets/css/style.css" rel="stylesheet"> </head> <body class="bg-light"> <div class="container py-5"> <h3 class="text-center mb-4">ตรวจสอบสถานะการจอง</h3> <form method="get" class="text-center mb-4"> <input type="text" name="phone" class="form-control d-inline-block" style="width:250px" placeholder="กรอกเบอร์โทรศัพท์"> <button class="btn btn-primary">ตรวจสอบ</button> </form> <?php if(isset($_GET['phone'])){ $phone = $_GET['phone']; $res = $conn->query("SELECT * FROM orders WHERE phone='$phone' ORDER BY id DESC"); if($res->num_rows==0){ echo "<div class='alert alert-warning text-center'>ไม่พบข้อมูลการจอง</div>"; } else { echo "<table class='table table-bordered bg-white'>"; echo "<tr><th>เลขที่ใบจอง</th><th>ยอดรวม</th><th>สถานะ</th></tr>"; while($r=$res->fetch_assoc()){ echo "<tr><td>{$r['booking_no']}</td><td>{number_format($r['total'],2)}</td><td>{$r['status']}</td></tr>"; } echo "</table>"; } } ?> </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.41 |
proxy
|
phpinfo
|
Settings