Mysqli_select_db failed to connect to the database created by himself

$con = @ mysqli_connect ("localhost", "root", "", ") or die (" failed to connect to the database server ". Mysqli_connect_error ());
mysqli_select_db ("php_test", $con) or die ("specified database opening failed");

clipboard.png

Why my mysqli_select_db failed to connect to the database I created. Wrong path? I checked the file. That"s what it says. Ask experienced friends to share. Thank you

Mar.29,2021

parameter is used in reverse

clipboard.png


$con=mysqli_connect("localhost","root","password","php_test"); 
The

mysqli_connect () function directly selects the database.

Menu