/
home
/
efamember
/
domains
/
efa-member.com
/
public_html
/
main
/
ajax
/
account_receipt
/
up file
home
<?php session_start(); include('../../../config/main_function.php'); $secure = "cAh3DrJACzw4RbU"; $connection = connectDB($secure); if ($connection) { $member_name = mysqli_real_escape_string($connection, $_POST['member_name']); $sql_select = "SELECT * FROM tbl_member_detail WHERE member_name LIKE '%$member_name%' OR member_name_en LIKE '%$member_name%'"; $res_select = mysqli_query($connection, $sql_select) or die($connection->error); } ?> <style> .select2-close-mask { z-index: 2099; } .select2-dropdown { z-index: 3051; } </style> <div class="modal-header"> <h4 class="modal-title">เลือกสมาชิก</h4> <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="modal-body"> <div class="table-responsive"> <table class="table table-striped dataTables-example2 table-bordered"> <thead> <tr> <th>#</th> <th>รายละเอียด</th> <th style="width: 5%;"></th> </tr> </thead> <tbody> <?php while ($row = mysqli_fetch_array($res_select)) { ?> <tr> <td><?php echo $i += 1; ?></td> <td> <?php echo ($row['member_name'] != '') ? $row['member_name'] . '<br>' : $row['member_name_en']; ?> <?php echo ($row['citizen_no'] != '') ? 'ID : ' . $row['citizen_no'] . '<br>' : ""; ?> <?php echo ($row['phone'] != '') ? 'Phone : ' . $row['phone'] . '<br>' : ""; ?> <?php echo ($row['email'] != '') ? 'Email : ' . $row['email'] . '<br>' : ""; ?> </td> <td> <button type="button" class="btn btn-primary btn-sm w-100" onclick="GetMemberData('<?php echo $row['member_id']; ?>')"></i> เลือก</button> </td> </tr> <?php } ?> </tbody> </table> </div> </div> <div class="modal-footer"> <button type="button" class="btn btn-primary" onclick="GetMemberData()"><i class="fa fa-check"></i> เลือก</button> <button type="button" class="btn btn-white" data-dismiss="modal">ปิด</button> </div> <script> $(".select2").select2({ width: "100%" }); function SelectMember() { $.ajax({ type: "method", url: "url", data: "data", dataType: "dataType", success: function(response) { $("#customer_name").val("SSR"); $("#myModal2").modal("hide"); } }); } </script>