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?
王林2019-08-21 17:48:55
mysqli_connect($localhost,$username,$password,$dbname,$port);
This is also possible
angryTom2019-07-15 11:49:22
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