File: /home/klungadmin/domains/klungbaan.com/private_html/bureau/search_result.php
<?php
require "connect.php";
$sql = "SELECT * FROM tb_register where tel like '%{$_POST['search']}%' AND event_id={$_POST['event']}";
$query = mysqli_query($conn,$sql);
?>
<div class="col-md-12">
<table class="table table-bordered">
<thead>
<tr>
<th>ชื่อ</th>
<th>นามสกุล</th>
<th>อายุ</th>
<th>เบอร์</th>
</tr>
</thead>
<tbody>
<?php while ($result = mysqli_fetch_assoc($query)) { ?>
<tr>
<td><?php echo $result['name'];?></td>
<td><?php echo $result['surName'];?></td>
<td><?php echo $result['age'];?></td>
<td><?php echo $result['tel'];?></td>
</tr>
<?php } ?>
</tbody>
</table>
</div>