I have to access values from post variable in php class function in jquery. this is my function in php class:
function myFunction(){
$id = $_POST[$this->id];
$name= $_POST[$this->name];
echo id;
echo name;
}
I can get value for id and name I want to access id and name properties in jquery?how can I do this i'm trying like this
$( document ).ready(function() {
var id =$id;
var name=$name;
alert(id);
alert(name);
});
how can I access these in jquery