I need help to figure out why this is error
<?php
class data
{
private $db;
public $nama, $password, $alamat, $jk, $kodepos, $alasan, $email;
function _construct($db)
{
$this->db = $db;
}
public function input_data()
{
$query = "INSERT INTO data (nama, password, alamat, jeniskelamin, kodepos, alasan, email)VALUES('$this->nama', '$this->password',
'$this->alamat', '$this->jk', '$this->kodepos', '$this->alasan', '$this->email')";
$insert = mysqli_query($this->db, $query);
return $insert;
}
public function lihat_data()
{
$query = "SELECT * FROM data ORDER BY id";
$view = mysqli_query($this->db, $query);
return $view;
}
}
?>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…