andre 4 gadi atpakaļ
vecāks
revīzija
b069d82d32
1 mainītis faili ar 6 papildinājumiem un 7 dzēšanām
  1. 6 7
      index.php

+ 6 - 7
index.php

@@ -1,14 +1,13 @@
 <?php
 error_reporting(E_ALL);
 class db extends mysqli {
-    protected $host = 'localhost';
-    protected $user = 'ban';
-    protected $pass = 'Blubb123-';
-    protected $db   = 'ban';
+    private $host = 'localhost';
+    private $user = 'ban';
+    private $pass = 'Blubb123-';
+    private $db   = 'ban';
 
-    public function __construct($host = 'localhost', $user = null, $pass = null, $db = null) {
-        print_r($user);
-        @parent::__construct($host, $user, $pass, $db);
+    public function __construct() {
+        @parent::__construct($this->host, $this->user, $this->pass, $this->db);
         if($this->connect_errno){
             die($this->connect_error);
         }