I have the following PHP code (will destroy the sample database later, credentials will work) but I cant create a successful connection. Any guess? Thanks for the help!
Please be aware that this is a public forum, and anything you write here can be seen by anyone. So make sure to not share any sensitive data here (like passwords!).
As for the issue itself, you say that you are unable to connect to the database? If so, this line in your code should show the reason why it doesn’t work. What is the error message you see?
die ("Connection failed: " . $conn->connect_error);