summaryrefslogtreecommitdiff
path: root/app/v1_php/api/mysql_connect.inc.php
diff options
context:
space:
mode:
Diffstat (limited to 'app/v1_php/api/mysql_connect.inc.php')
-rw-r--r--app/v1_php/api/mysql_connect.inc.php11
1 files changed, 11 insertions, 0 deletions
diff --git a/app/v1_php/api/mysql_connect.inc.php b/app/v1_php/api/mysql_connect.inc.php
new file mode 100644
index 0000000..0414480
--- /dev/null
+++ b/app/v1_php/api/mysql_connect.inc.php
@@ -0,0 +1,11 @@
+<?php
+
+$mysqlcon=mysql_connect("localhost", "usi2011", "usi2011");
+$res=mysql_select_db("usi2011");
+
+if ( ! is_resource($mysqlcon) || $res !== 0) {
+ //header 400, Erreur connexion SQL
+ echo "Erreur connexion SQL\n";
+ exit();
+}
+?>