[SOLVED] controller not passing Data to my veiw

#1
[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 Tongue.

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>&lt;?php echo $banned_user_slname;?&gt;</li>
<hr />

&lt;?php endforeach;?&gt;

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.


Messages In This Thread
[SOLVED] controller not passing Data to my veiw - by El Forum - 08-13-2010, 11:25 AM
[SOLVED] controller not passing Data to my veiw - by El Forum - 08-13-2010, 12:12 PM
[SOLVED] controller not passing Data to my veiw - by El Forum - 08-13-2010, 12:13 PM
[SOLVED] controller not passing Data to my veiw - by El Forum - 08-13-2010, 12:46 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.