Browse Source

Add 'public_html/config/database.php'

david.ortiz11 4 years ago
parent
commit
5d92bd7f3f
1 changed files with 23 additions and 0 deletions
  1. 23
    0
      public_html/config/database.php

+ 23
- 0
public_html/config/database.php View File

@@ -0,0 +1,23 @@
1
+<?php
2
+/*  Authors         :   Carlos C. Corrada-Bravo
3
+                        David J. Ortiz-Rivera
4
+
5
+    Organization    :   Centro de Desarrollo y Consultoria Computacional
6
+    Project         :   OPASO Material Registry   
7
+    File            :   database.php
8
+    Description     :   Initialize database connection */
9
+
10
+    /* set args */ 
11
+	$server = "localhost";
12
+	$username = "";
13
+	$password = "";
14
+	$name = "OPASO_prueba";
15
+
16
+	/* create connection */
17
+	$db = new mysqli($server,$username,$password,$name);
18
+	
19
+	/* check connection */
20
+	if ($db->connect_error){
21
+	    die("Connection failed: " . $db->connect_error);
22
+	}
23
+?>