This should be a elementary question but why is better to use something like this:
$pwd = filter_input(INPUT_POST, 'pwd');
Instead of just:
$pwd = $_POST['pwd'];
PS: I understand that the filter extension can be used with more arguments to provide an additional level of sanitization.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…