This is my code
$conn = mysql_connect($serverName, $username, $password)
or die("Unable to connect to MySQL");
$selected = mysql_select_db($databaseName,$conn)
or die("Could not find the database");
$result = mysql_query("INSERT INTO `user` () VALUES ()");
return mysqli_insert_id($result)
This is the exception
Warning: mysqli_insert_id() expects parameter 1 to be mysqli, boolean given in C:\xampp2\htdocs\XXX\controllers\User.php on line 24
and the line 24 is return mysqli_insert_id($result)