Postingan lainnya
Error: call to a member function insert() on null in c:\xampp\htdocs\blog\class\user.php on line 11
mau bertanya saat mau mulai lanjut belajar oop login ada eror di insert ya gak ke baca line 11 dan ini syintakya db = database::getInstance(); }
public function register_user($filds = array()) { if ($this->db->insert('user', $filds)) { return true; }else { return false; } } } ?>
Tanggapan
taro kode di tag kode biar enak dibacanya..
1 Jawaban:
<div>sama error, <br><br><strong>Fatal error</strong>: Uncaught Error: Call to a member function insert() on null in E:\xampp\htdocs\tutorial\auth_oop\classes\User.php:13 Stack trace: #0 E:\xampp\htdocs\tutorial\auth_oop\register.php(8): User->register_user(Array) #1 {main} thrown in <strong>E:\xampp\htdocs\tutorial\auth_oop\classes\User.php</strong> on line <strong>13</strong></div>