Connect.php (598B) download
1<?php
2class Connect
3{
4 protected string $servername = "86.92.67.21";
5 protected string $username = "friedel";
6 protected string $password = "hailiwa";
7 protected string $dbname = "wap2";
8 protected mysqli $conn;
9 function __construct(){
10 // Create connection
11 $this->conn = mysqli_connect($this->servername, $this->username, $this->password, $this->dbname);
12 // Check connection
13 if (!$this->conn)
14 {
15 die("Connection failed: " . mysqli_connect_error());
16 }
17 }
18 function getConn(){
19 return $this->conn;
20 }
21}
22?>