I try make php login but i get this error: Warning: mysqli_real_escape_string() expects exactly 2 parameters, 1 given, what I do wrong?
register.php
From the documentation , the function mysqli_real_escape_string() has two parameters.
string mysqli_real_escape_string ( mysqli $link , string $escapestr ).
The first one is a link for a mysqli instance (database connection object), the second one is the string to escape. So your code should be like :
$username = mysqli_real_escape_string($yourconnectionobject,$_POST['username']);