[eluser]Neocrypter[/eluser]
Ok so the second installment of Neo needs help and feels like a tard is as follows.
My controller is not passing data to my my veiw, or im not reading the error im getting correctly as its been many years since ive worked with php, somewhere around php 3
.
Here is my controller
Code:
<?php
class Banned_user extends Controller{
private $data;
function Banned_user(){
parent::Controller();
$this->load->database();
$this->load->scaffolding('banned_users');
}
function index(){
$this->load->model('banned_users_model','bu');
$data['query'] = $this->bu->get_entries();
//$data['title'] = 'Banned Users';
// $data['page'] = 'banned_users';
$this->load->view('banned_users', $data);
}
}
?>
here is the foreach loop in my veiw
Code:
<?php foreach($query as $row):?>
<li><?php echo $banned_user_slname;?></li>
<hr />
<?php endforeach;?>
and lastly here is there error
Quote:A PHP Error was encountered
Severity: Notice
Message: Undefined variable: banned_user_slname
Filename: views/banned_users.php
Line Number: 6
thanks in advance.