我会将表单发送到单页登录名和密码https://rotaexata.centralizee.com/usuarios/login
http和https登录表单之间的通信
<div style="text-align:center; margin-top:2px; margin-left:35px;color: #FFF;"><img src="images/saiba_veiculo.png" /><p>Rota Exata</p></div>
<div style="margin-top:2px;">
<form name="frmLogin2" id="UsuarioLoginForm" action="https://rotaexata.centralizee.com/usuarios/login" method="post" accept-charset="utf-8">
<div style="display:none;"><input type="hidden" name="_method" value="POST"></div>
<div class="textorodape" style="margin-left:10px; padding-bottom:3px; text-align:right; font-size: 12px;">Login:
<input type="text" id="UsuarioEmail" name="UsuarioEmail" class="inputLogin" />
</div>
<div class="textorodape" style="margin-left:10px; padding-bottom:3px; text-align:right;"><span style="font-size: 12px">Senha</span>:
<input type="password" id="UsuarioSenha" name="UsuarioSenha" class="inputLogin"/>
</div>
<div class="textorodape" style="margin-left:10px; margin-top:5px; padding-bottom:3px; text-align:right;"> <a href="mailto:contato@rastreacar.com.br" style="color: #1C0101; font-weight: bold;" >Esqueceu a senha?</a>
<input name="btnEntrar" type="submit" class="inputButtonLogin" value="Entrar" onclick="log3();"/>
</div>
</form>
</div>
JavaScript
function log3(){
document.frmLogin.action='https://rotaexata.centralizee.com/usuarios/login';
documento.frmLogin.submit();
}
答案 0 :(得分:0)
您的表单指定:name="frmLogin2"
,但您的JavaScript搜索frmLogin
。此外,登录页面的简单POST
就足够了,您可以将操作留空,然后将其发送到同一页面。
然后你可以问一下:
if(isset($_POST["btnLogin"]))
{
//Do login stuff here, if credentials are correct, redirect.
}