页实施例:使用SSL/HTTPS上
a.php只会
<html>
<body>
<form action="b.php" method="post">
<input name="username" type="text" />
<input name="password" type="password" />
<input type="submit" />
</form>
</body>
</html>
b.php
<?
$sql = "SELECT * FROM user WHERE username = '{$_POST['username']}' && password = '{$_POST['password']}'";
if (....) {
$_SESSION['logged'] = true;
header('location: a.php');
exit;
}
?>
HTTPS应当在页面中使用?
https://example.com/a.php or https://example.com/b.php?
是的,我知道需要配置服务器。 因为我有很多页面使用登录表格 sublimt指向相同的页面(例如B.php) 但我不想在每个页面中使用https。 所以我想确保只在目标页面中使用https。 是否可行? 感谢您的所有答案。 – user1245077 2012-03-03 14:22:50
然后你可能想阅读这个http://stackoverflow.com/questions/2025012/ssl-how-and-when-to-use-it – 2012-03-05 08:25:22