This should be a elementary question but why is better to use something like this:
$pwd = filter_input(INPUT_POST, \'pwd\');
Instead of jus
It is not better.
Please see docs on filter_input http://www.php.net//manual/en/function.filter-input.php
and click the "Types of Filters" link. http://www.php.net/manual/en/filter.filters.php
I have only ever used the integer filter ...
$user_id = filter_input(INPUT_POST, 'user_id', FILTER_SANITIZE_NUMBER_INT);
$user = abs($user_id); // To get rid of any +/-