I wrote it according to your code, but I got an error when accessing it.
Isn’t it necessary to fill in the database connection account and password here?
mysqli_connect($localhost,$username,$password,$dbname,$port);
This is also possible
You can share your error report and take a look. It may also be that you forgot to set the password when creating the database connection in the database
mysqli_connect($localhost,$username,$password,$dbname,$port);
This is also possible
You can share your error report and take a look. It may also be that you forgot to set the password when creating the database connection in the database