1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
|
class RaviKoQr
{
public $server = "localhost";
public $user = "root";
public $pass = "";
public $dbname = "kalabante";
public $conn;
public function __construct()
{
$this->conn= new mysqli($this->server,$this->user,$this->pass,$this->dbname);
if($this->conn->connect_error)
{
die("connection failed");
}
}
public function insertQr($qrUname,$final,$qrimage,$qrlink)
{
$sql = "INSERT INTO qrcodes(qrUsername,qrContent,qrImg,qrlink) VALUES('$qrUname','$final','$qrimage','$qrlink')";
$query = $this->conn->query($sql);
return $query;
}
public function displayImg()
{
$sql = "SELECT qrimg,qrlink from qrcodes where qrimg='$qrimage'";
}
}
$meravi = new RaviKoQr(); |
Partager