我只是想知道我是否做得对。
PHP
<?php
if(isset($_POST['email']) && isset($_POST['password'])) {
$email = htmlentities(mysql_real_escape_string($_POST['email']));
// then hash password
}
?>
HTML
<form action="" method="POST">
<input type="email" name="email" />
<input type="password" name="password" />
<input type="submit" name="Login" />
</form>
htmlentities()
和一起做好mysql_real_escape_string
吗?
或者我需要做什么?