-
-
Save batandwa/0c1f2cd713b9709d2d24ba53e79e7f9d to your computer and use it in GitHub Desktop.
php-mysql-test.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $servername = $_ENV["DB_HOST"]; | |
| $username = $_ENV["DB_USER"]; | |
| $password = $_ENV["DB_PASSWORD"]; | |
| $dbname = $_ENV["DB_NAME"]; | |
| $conn = new mysqli($servername, $username, $password, $dbname); | |
| if ($conn->connect_error) { | |
| die("Connection failed: " . $conn->connect_error); | |
| } | |
| echo "Connected successfully"; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment