Welcome Guest, Not a member yet? Register   Sign In
...undefined property
#11

[eluser]drseuss[/eluser]
I reinstalled codeigniter and setup everything correctly
Checking everything 2 or 3 times and it's still not working.
#12

[eluser]InsiteFX[/eluser]
Just for a test change your function login() below to function index() and see if it works!
Code:
class Account extends CI_Controller {

    function __construct()
    {
        parent::__construct();
        
    }

    function index() {

        $this->load->model('account_model');

        $query = $this->account_model->login();

        //$accountId = $this->account_model->account_info('id');
        
        if($query) {

            $session_data = array(

                'email'=>$this->input->post('email'),

                'accountId'=>$accountId->id,

                'is_logged_in'=>true

            );

            $this->session->set_userdata($session_data);

            //redirect('character');
            echo "oh yea!";

        } else {

            $data['error'] = "Bad login information supplied. <br />";

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

        }
        
        
    }
}

InsiteFX
#13

[eluser]drseuss[/eluser]
I've made the change and I still have the error.

A PHP Error was encountered

Severity: Notice

Message: Undefined property: Account::$account_m

Filename: controllers/account.php

Line Number: 21

I guess I am just going to start over on it -.-
#14

[eluser]InsiteFX[/eluser]
If you check it's telling you that your Model is not being loaded!

Thats why I asked you to try using index.

Did you check your log files to see what is going on?

InsiteFX
#15

[eluser]drseuss[/eluser]
My apache log pretty much tells me the same as CI

[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP Fatal error: Call to a member function login() on a non-object in C:\\wamp\\www\\application\\controllers\\account.php on line 21, referer: http://localhost/
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP 1. {main}() C:\\wamp\\www\\index.php:0, referer: http://localhost/
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP 2. require_once() C:\\wamp\\www\\index.php:198, referer: http://localhost/
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP 3. call_user_func_array() C:\\wamp\\www\\system\\core\\CodeIgniter.php:325, referer: http://localhost/
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP 4. Account->index() C:\\wamp\\www\\system\\core\\CodeIgniter.php:0, referer: http://localhost/
#16

[eluser]InsiteFX[/eluser]
I just checked it on my system remarking out your code for the database and it works!

Are you running MySQL?

Did you create the database and the table accounts ?

InsiteFX
#17

[eluser]drseuss[/eluser]
Yes, I've set everything up. Database and CI settings.

I'm running MySQL that comes with WAMP.
#18

[eluser]InsiteFX[/eluser]
This line right here is telling you that your model is not being loaded!
Code:
[Wed Mar 30 09:41:14 2011] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function login() on a non-object in C:\\wamp\\www\\application\\controllers\\account.php on line 21, referer: http://localhost/

Yet when I remark out your database and session stuff it loads on my XAMPP system!

You need to track down why your model is not loading...

Something to do with your installation!

InsiteFX
#19

[eluser]drseuss[/eluser]
Do you think the problem could be WAMP?
#20

[eluser]vihumize[/eluser]
what version of CI have???




Theme © iAndrew 2016 - Forum software by © MyBB