Welcome Guest, Not a member yet? Register   Sign In
Blank Page Problem
#1

[eluser]extra_rice[/eluser]
i've searched the entire forum but the solutions doesn't seem to work for me...

this is a function in my controller and the method redirect to user_list() gives me a blank white page...
Code:
function user()
    {
        $method = $this->uri->segment(3);
        $param = $this->uri->segment(4);
        
        if ( !empty($method) )
        {
            switch ( $method )
            {
                case 'login':
                    $this->user_login();
                break;

                case 'list':
                    $this->user_list($param); //param here is offset
                break;

            }
            
            exit;
        }
        else
        {
            $this->load->view('login');
        }
    }

    function user_list($offset=0)
    {
        $this->load->library('pagination');

        $cf['base_url'] = 'http://mysite.com/admin/user/list/';
        $cf['total_rows'] = $this->user->getCount();
        $cf['per_page'] = '10';

        $this->pagination->initialize($cf);

        $data['list'] = $this->user->getList(10, $offset);
        $data['count'] = $this->user->getCount();

        $this->load->view('list', $data);
    }

anybody know what im doing wrong?

UPDATE: when i do a http://mysite.com/admin/user_list/ it works... wonder why my current setup doesn't...
#2

[eluser]Bramme[/eluser]
have you got error reporting on? Probably smth happens, but you're not getting an error.
#3

[eluser]Chillahan[/eluser]
Not sure if this is of consequence, but I am experiencing bugs with class Pagination where it will generate a link that says "3", but when clicked, it brings me to page "4' (which doesn't exist!). Still debugging what this is (or deciding just to roll my own pagination - it doesn't really do too much except read what page you are on and generate a semi-acceptable page selector, after all - still have to roll your own "remember what page you were on" functionality, etc.).
#4

[eluser]extra_rice[/eluser]
[quote author="Bramme" date="1215636048"]have you got error reporting on? Probably smth happens, but you're not getting an error.[/quote]

got my error reporting on... really don't know the problem is... =(
#5

[eluser]JoostV[/eluser]
For debugging, add the follwing code to your controller just before you load the view:
Code:
echo '<pre>' . print_r[$data, true] . '</pre>';
This will tell you if your query is returning any data.
#6

[eluser]extra_rice[/eluser]
[quote author="JoostV" date="1215688637"]For debugging, add the follwing code to your controller just before you load the view:
Code:
echo '<pre>' . print_r[$data, true] . '</pre>';
This will tell you if your query is returning any data.[/quote]

it's returning what it's supposed to return... i still can't figure out what's wrong... getting stuffed eating pan de sal and drinking kool aid while thinking of how to solve it... :-(
#7

[eluser]extra_rice[/eluser]
i don't have a solution yet but i pinpointed the problem...

you can't do a load->view using my code... i don't know why... anybody got any ideas?




Theme © iAndrew 2016 - Forum software by © MyBB