使用https和http登录表单

时间:2011-04-13 08:38:06

标签: http https security

我想只在登录表单中使用https,在用户登录后将其发送给http。

登录表单位于“a.php”页面,登录表单的操作为“b.php”。

我的问题是:

我的意思是发布数据是根据表单页面或操作页面协议发送的?

1 个答案:

答案 0 :(得分:0)

带有输入字段的页面(a.php)应该在HTTP上,而带有身份验证逻辑的页面(b.php)应该在HTTPS上。

在a.php中会有这样的东西:

<form method="post" action="https://[domain-name]/b.php">
    <input type="text" name="username" />
    <input type="password" name="password" />
    <input type="submit" value="login" />
</form>
相关问题