Error:
XMLHttpRequest cannot load http://localhost/appread/Post.php.
Response for preflight is invalid (redirect)
Ajax code:
$('#btn-sinc').click(function(){
$.ajax({
type: "POST",
url: 'http://localhost/appread/Post.php',
data: "cliente="+ClienteStorage,
contentType: "application/json; charset=utf-8",
dataType: 'json',
success: function (data){
alert('Dado Enviado');
}
});
});
I'm pretty sure the code is not quite right. If anyone can lend a hand, I appreciate it.