summaryrefslogtreecommitdiff
path: root/automated/linux/lemp/html/connect-db.php
diff options
context:
space:
mode:
Diffstat (limited to 'automated/linux/lemp/html/connect-db.php')
-rw-r--r--automated/linux/lemp/html/connect-db.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/automated/linux/lemp/html/connect-db.php b/automated/linux/lemp/html/connect-db.php
new file mode 100644
index 0000000..5bcdeed
--- /dev/null
+++ b/automated/linux/lemp/html/connect-db.php
@@ -0,0 +1,14 @@
+<?php
+$servername = "localhost";
+$username = "root";
+$password = "lemptest";
+
+// Create connection
+$conn = new mysqli($servername, $username, $password);
+
+// Check connection
+if ($conn->connect_error) {
+ die("Connection failed: " . $conn->connect_error);
+}
+echo "Connected successfully";
+?>