So I was wondering, if I need to escape a string, why do I need to connect to my database first?
I tried something like:
$username = mysqli_real_escape_string($username);
But that didn't work, it requires 2 parameters(one of which is the $connect) Could y ou please explain the purpose of connecting to the database first and then escaping it?
I would also like to know how would that be efficient/applied in a registration page as well?
Thanks.