i've got a little question regarding the usage of Ajax. I've done a search for the same issues but i can't find something to look alike with my problem.
Here is my code.
$(document).ready(function()
{
$("#nume").blur(function() {
numeform = $("#nume").val();
if (numeform){
$.ajax({
type: "POST",
url: "../../index.php",
data: {numeform : numeform},
cache: false,
success: function(response) {
data = numeform;
console.log(data);
}
});
}
});
});
and in the php file i have
$data = $_POST['data'];
echo $data;
The console shows as it should. Any help is greatly appreciated.