debug = $debug; $this->mysqli = $mysqli; $this->salt = $salt; $this->table = 'settings'; } public function getValue($name) { $query = $this->mysqli->prepare("SELECT value FROM $this->table WHERE setting=? LIMIT 1"); $query->bind_param('s', $name); $query->execute(); $query->bind_result($value); $query->fetch(); $query->close(); return $value; } } $settings = new Settings($debug, $mysqli, SALT);