I'm making PHP-code, and use database, MySql. I wonder about parameter binding, and here is an example with a field (pw) excluded;
If the user sends a username via form, and it comes as POST
$username = $_POST["username"];
and then is used to log in;
$query = "SELECT * FROM users WHERE username = :username";
then
$stmt = $conn->prepare($query);
$stmt->bindParam(":username", $username);
Has there been any protection? I mean compared to using the POST variable directly.
Greetings