Subversion Repository Public Repository

Nextrek

Diff Revisions 508 vs 517 for /Android/SmartCharging/endPoints/nightly/registrazione_utente.php

Diff revisions: vs.
  @@ -2,12 +2,14 @@
2 2 header("Access-Control-Allow-Origin: *");
3 3 header('Content-Type: application/json; charset=UTF-8');
4 4
5 + require_once("constants.php");
6 +
5 7 require_once("repositories/UserRepository.php");
6 8 require_once("classes/User.php");
7 9
8 - $servername = "localhost";
10 + /*$servername = "localhost";
9 11 $username = "smartcharging";
10 - $password = "LXRLBaEAuRr7M7jY";
12 + $password = "LXRLBaEAuRr7M7jY";*/
11 13
12 14 //$params = json_decode($_REQUEST["params"], true);
13 15
  @@ -23,7 +25,7 @@
23 25 //var_dump($params);
24 26
25 27 try {
26 - $conn = new PDO("mysql:host=".$servername.";dbname=smartcharging", $username, $password);
28 + $conn = new PDO("mysql:host=".DB_SERVERNAME.";dbname=".DB_NAME, DB_USERNAME, DB_PASSWORD);
27 29 $conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
28 30 //echo "Connesso con successo al DB";
29 31