Код: Выделить всё
xmlhttp.onreadystatechange = function() {
if (this.readyState == 4 && this.status == 200) {
console.log(localStorage.getItem("loginstatus"));
}
};
xmlhttp.open("POST", "signuserphp.php", true);
xmlhttp.setRequestHeader("Content-type", "application/x-www-form-urlencoded");
xmlhttp.send("email="+email+"&pass="+pass);
Код: Выделить всё
Подробнее здесь: [url]https://stackoverflow.com/questions/78255944/setting-a-value-in-localstorage-in-a-php-file-that-has-been-called-through-js-aj[/url]