我有两个页面可以说是页面A和页面B.页面A将表格上的数据提交给页面B作为操作i-e form action =“Page B”。如果登录成功,则页面B执行一些处理并且在身份验证之后将用户重定向到页面C,如果登
我想在处理页面B之后获取URL以检查它是在页面B中还是重定向到页面C.下面是页面A的代码。
function can_user_login($username , $password){
echo '
<form id = "autoSubmit" action = "Page B" method = "post" target="_blank">
<input type = "hidden" name= "LoginForm[username]" id = "LoginForm_username" placeholder = "Enter Username" value = "'.$username.'" >
<input type = "hidden" name= "LoginForm[password]" id = "LoginForm_password" placeholder = "Enter password" value= "'.$password.'" >
<noscript><input type="submit" value="Click here if you are not redirected."/></noscript>
<script type="text/javascript">
document.getElementById("autoSubmit").submit();
</script>
</form>
';
//check that after submit it is at page B or redirect to Page C
}
希望你能理解我的问题并帮助我解决问题。 感谢