estoy viendo tu codigo en lugar de POST tienes un GET
Código HTML:
Ver original<!DOCTYPE html>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"> <script src="https://code.jquery.com/jquery-2.1.3.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script> <input type="text" id="log_id"> <input type="text" id="log_pass">
$(document).ready(function(){
$("#go").on('click',function(){
var id = $("#log_id").val();
var pass = $("#log_pass").val();
if(id.length > 0 && pass.length > 0){
$.ajax({
type:"GET",
dataType: 'jsonp',
crossDomain: true,
url: "http://envioporpost.esy.es/verificar.php?jsoncallback=?",
jsonpCallback: 'jsonCallback',
data:"user="+id+"&pass="+pass,
success:function(data){
// data = JSON.parse(data);
console.log(data.users);
console.log(data.passw);
var myDate = new Date();
myDate.setMonth(myDate.getMonth() + 12);
document.cookie = "user_da=" + data.users + ";expires=" + myDate
+";domain=.http://envioporpost.esy.es;path=/";
document.cookie = "pass=" + data.passw + ";expires=" + myDate
+";domain=.http://envioporpost.esy.es;path=/";
// var nomb = localStorage.getItem("users_d");
// var passd = localStorage.getItem("pass_d");
window.location.href = "http://envioporpost.esy.es";
},
xhrFields: {
withCredentials: true
},
statusCode: {
404: function() {
console.log( "page not found" );
},
200: function() {
console.log( "encontrado" );
}
},
error:function(jqXHR, status, error){
console.log(status + '; ' + error);
}
});
}
});
});