I have encountered a really weird situation. Im developing a software, to which I want to add a feature to confirm email, so basically, it sends an ajax request to my server and server responds with a key, this key will be also sent in the email within a link. This key is saved as a variable and then I add a setInterval, which runs a link, which by the key responds if the user has clicked the link or not. The data is stored in mysql. That everything works perfectly fine with one little issue. The AJAX responses do not update and just keep the old value although when I open the checking link in my browser the response is indeed different, does anybody have any thoughts what might by causing this issue?
$.ajax({
url: "http://...&em=" + email,
type: "GET",
success: function(rese){
if(rese === "E1") {
}else{
var checker = setInterval(function(){
$.ajax({
url: "http://...&key=" + rese,
type: "GET",
success: function(resee){
alert(resee);
}
});
}, 3000);
}
}
});
Edit - Server responses: so, the data is updated in the moment, when user does click the link, the value changes to "yes", while normally, it would respond with just "no", but anyway, ajax keeps alerting me with no, even when i just have updated the value straight in the database