i have this code
function getPackage(id) {
console.log(id)
}
<button onClick="getPackage('.$rRow["id"].')" type="button" data-bs-toggle="modal" data-bs-target="#exampleModalScrollable" data-bs-placement="top" onClick="myFunction();" title="Download Playlist" class="btn btn-light waves-effect waves-light btn-xs" ><i class="mdi mdi-video-switch"></i></button>
so when i clic on button i pass the value of id
to a function getPackage()
and i can see the value in console.log(id)
now i have a php code :
<?php $rUser = getUser("61"); ?>
my question is how i can pass the value of js variable console.log(id)
to my php code ?? i need to change the number "61" by the js variable id
, for exemple like this :
<?php $rUser = getUser("id"); ?>
any one have idea ? thank you