PHP – Pop-up to display details

14
3



PHP – Pop-up to display details

Previous part:

Source files:

Download Android App:

Nguồn:https://wijstaanvooronzegrondrechten.org/

14 COMMENTS

  1. hi sir please help me out… theres no data output in my modal form 🙁
    that's the only part of the process I cant do:
    I have my codes below kindly check
    Thank you!

    <?php

    $conn = mysqli_connect("localhost","root","","try");

    $customerNumber = $_GET["customerNumber"];

    $result = mysqli_query($conn, "SELECT * FROM try WHERE customerNumber=$customerNumber");

    $customer = mysqli_fetch_object($result);

    echo json_encode($customer);

    ?>

    <!doctype html>

    ANDD

    <script>

    function loadData(id){

    //var customerNumber = button.id;

    $.ajax({

    url:"index.php",

    method: "POST",

    data: {"customerNumber": customerNumber},

    success: function(response) {

    var customer = JSON.parse(response);

    $("#phone").text(customer.phone);

    $("#customerNumber").text(customer.customerNumber);

    $("#myModalLabel").Text(customer.customerName);

    }

    });

    }

    </script>

  2. Buenas tardes amigo me puedes decir que puedo usuar en php para mostrar el preview del formulario que voy a cargar en la bd

  3. I tried this but when I clicked the button it automatically refreshed the page. how can i prevent it from refreshing automatically after clicking the button?

LEAVE A REPLY

Please enter your comment!
Please enter your name here