How to pass a parameter in the Ajax call

How to pass a parameter in the Ajax call

LuftwalkLuftwalk Posts: 1Questions: 1Answers: 0

Hi,

I have gone through documentation quite extensively but must have missed this. How can I pass a parameter to a php script to narrow the results I want to show?

var table = $('#skulisting').DataTable( {
        ajax: "php/listing.php",
        columns: [
            { data: "sPackingList.EAN" },
            { data: "sPackingList.title" },
            { data: "sEANList.colbySize" },
            { data: "sPackingList.quantity" },
            { data: "sPackingList.receivedQuantity" },
            { data: "sPackingList.recommendedQuantity" }
        ]

I would like to pass a variable to listing.php that would allow me to set a where condition in the query needed. Someone care to help? And how do I access that variable in the php script? I presume it's either GET or POST depending on the Ajax type?

Thank you in advance

This discussion has been closed.