Nextrek
Diff Revisions
516
vs
517
for /Android/SmartCharging/endPoints/nightly/edit_utente.php
|
@@ -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 |
|
|
|
@@ -21,7 +23,7 @@ |
21 |
23 |
|
//var_dump($params); |
22 |
24 |
|
|
23 |
25 |
|
try { |
24 |
|
- |
$conn = new PDO("mysql:host=".$servername.";dbname=smartcharging", $username, $password); |
|
26 |
+ |
$conn = new PDO("mysql:host=".DB_SERVERNAME.";dbname=".DB_NAME, DB_USERNAME, DB_PASSWORD); |
25 |
27 |
|
$conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); |
26 |
28 |
|
//echo "Connesso con successo al DB"; |
27 |
29 |
|
|