The ajax request is working but the problem I'm having is how to encrypt the data with my PHP function before the request is made?
Here is the JS I'm trying
$("#sensitive_data").blur(function() {
alert($(this).val());
$.ajax({
url: 'db.php?check=<?php echo $object->encrypting_data('+$(this).val()+') ?>',
type: 'POST',
error : function (){ document.title='error'; },
success: function (data) {
alert(data);
}
});
});
It works if I pass a static value in the php function