summaryrefslogtreecommitdiff
path: root/api/mig_wan6ll.php
diff options
context:
space:
mode:
Diffstat (limited to 'api/mig_wan6ll.php')
-rw-r--r--api/mig_wan6ll.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/api/mig_wan6ll.php b/api/mig_wan6ll.php
index 173f7fe..7661f13 100644
--- a/api/mig_wan6ll.php
+++ b/api/mig_wan6ll.php
@@ -21,8 +21,11 @@
include_once('inc/config.php');
$mysqli = new mysqli($db_config['host'], $db_config['username'], $db_config['password'], $db_config['database']);
+if (mysqli_connect_errno()) {
+ die(mysqli_connect_error());
+}
unset($db_config);
-$mysqli->query("SET NAMES 'utf8'");
+$mysqli->set_charset("utf8") or die($mysqli->error);
$arg_ip6wanll=(array_key_exists('ip6wanll', $_GET) && preg_match('/^[a-f0-9:]+$/', $_GET['ip6wanll']))?$_GET['ip6wanll']:NULL;