<?php
class xxxx{
public $link='';
function __construct($A, $B, $C){
$this->connect();
$this->storeInDB($A, $B, $C);
}
function connect(){
$this->link = mysqli_connect('localhost','aaaa','') or die('Cannot connect to the DB');
mysqli_select_db($this->link,'bbbb') or die('Cannot select the DB');
}
function storeInDB($A, $B, $C){
$query = "insert into xxxx set C='" .$C."', B='".$B."', A='".$A."';
$result = mysqli_query($this->link,$query) or die('Errant query: '.$query);
}
}
if($_GET['A'] != '' and $_GET['B'] != '' and $_GET['C'] != ''){
$dht11=new realproject($_GET['A'],$_GET['Bs'],$_GET['C']);
}
?>
<?php
class xxxx{
public $link='';
function __construct($A, $B, $C){
$this->connect();
$this->storeInDB($A, $B, $C);
}
function connect(){
$this->link = mysqli_connect('localhost','aaaa','') or die('Cannot connect to the DB');
mysqli_select_db($this->link,'bbbb') or die('Cannot select the DB');
}
function storeInDB($A, $B, $C){
$query = "insert into xxxx set C='" .$C."', B='".$B."', A='".$A."';
$result = mysqli_query($this->link,$query) or die('Errant query: '.$query);
}
}
if($_GET['A'] != '' and $_GET['B'] != '' and $_GET['C'] != ''){
$dht11=new realproject($_GET['A'],$_GET['Bs'],$_GET['C']);
}
echo "ถูกหน้าแล้ว!";
?>