So escaping a normal String is no problem with
$username = $mysqli->real_escape_string("Peter");
But how do I escape a global variable with user input? For example, I get the Username from the input field and saved it in $username. What have I to do now?
$username = ($_POST["Username"]);`