www/includes/db_profile_water.php

changeset 77
a9f8de2d7b2b
parent 45
95251bedfab4
child 211
63d0e40c58b9
equal deleted inserted replaced
76:804d45bdaa86 77:a9f8de2d7b2b
6 #Connect to the database 6 #Connect to the database
7 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME); 7 $connect = mysqli_connect(DBASE_HOST, DBASE_USER, DBASE_PASS, DBASE_NAME);
8 if (! $connect) { 8 if (! $connect) {
9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error()); 9 die('Connect Error (' . mysqli_connect_errno() . ') ' . mysqli_connect_error());
10 } 10 }
11 mysqli_set_charset($connect, "utf8" );
11 12
12 // get data and store in a json array 13 // get data and store in a json array
13 $query = "SELECT * FROM profile_water ORDER BY name"; 14 $query = "SELECT * FROM profile_water ORDER BY name";
14 if (isset($_GET['insert'])) { 15 if (isset($_GET['insert'])) {
15 // INSERT COMMAND 16 // INSERT COMMAND

mercurial