andre 4 years ago
parent
commit
6acc2cbfef
1 changed files with 14 additions and 0 deletions
  1. 14 0
      index.php

+ 14 - 0
index.php

@@ -0,0 +1,14 @@
+<?php
+$ip = 1234567;
+
+$db = new mysqli('localhost', 'ban', 'Blubb123-', 'ban');
+$db->set_charset('utf8');
+
+if ($db->connect_errno){
+    die('Sorry - gerade gibt es ein Problem');
+}
+function set($ip) {
+    $dbAction = $db->prepare("INSERT INTO list ('ip') VALUES (?) ON DUPLICATE KEY UPDATE count = count +1");
+    $dbAction->bind_param('i',$ip);
+    return $dbAction->execute();
+}