当我使用onPageSelected
并且在成功之后我的会话将不会设置,但会在成功后password_verify
变量并将我重定向到主页。当我刷新页面时,页面不会给我任何错误,这将允许我再次登录。我使用echo
构建它,并在md5()
之后设置会话。我错过了什么错误?我的md5() verification
文件中有session_start
。
的javascript
check_login_status.php
的login.php
function login(){
var e = _("email").value;
var p = _("password").value;
if(e == "" || p == ""){
_("status").innerHTML = "You have to fill out everything buddy...";
} else {
_("loginbtn").style.display = "none";
_("status").innerHTML = '<div class="preloader-wrapper small right active"><div class="spinner-layer spinner-blue"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-red"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-yellow"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div><div class="spinner-layer spinner-green"><div class="circle-clipper left"><div class="circle"></div></div><div class="gap-patch"><div class="circle"></div></div><div class="circle-clipper right"><div class="circle"></div></div></div></div>';
var ajax = ajaxObj("POST", "login.php");
ajax.onreadystatechange = function() {
if(ajaxReturn(ajax) == true) {
if(ajax.responseText == "login_failed"){
_("status").innerHTML = "Login unsuccessful, please go back and try again buddy.";
_("loginbtn").style.display = "block";
} else {
window.location = "@"+ajax.responseText;
// above sends user to user page after login
}
}
}
ajax.send("e="+e+"&p="+p);
}
}