Ho installato l'ultima verisone di xampp, volevo creare una semplice pagina di login


codice:
<formclass="" action="http://localhost/projects/login-php/registrazione.php" method="POST"> 
  nome utente<input type="text"name="username"value=""> 
  email<input type="text" name="email"value=""> 
  password<input type="password" name="password"value=""> 
  <input type="submit" name="submit" value="registrati"> 
</form>

codice:
<?php
  $connection = mysqli_connect('localhost', 'root', '');
  mysqli_select_db($connection, 'utenti');
  $username = $_POST['username'];
  $email = $_POST['email'];
  $password = $_POST['password'];
  $sql = "INSERT INTO utenti (username, email, password) VALUES ('$username',  '$email', '$password')";
  mysqli_query( $sql ,'localhost');
 ?>

Solo che dopo aver premuto il bottone registrati mi da questo errore:
Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\projects\login-php\registrazione.php on line 8