|
@@ -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
|
+?>
|