06-26-2017, 04:20 AM
How do I make a database row be a global?
I've used google search for answers and none of the results helped me.
I am using this tutorial.
Here is config/globals.php
Here are the errors I get.
Undefined property: CI_Loader::$load on Line 7
Call to a member function database() on null on Line 7
Is there a good way of making a database row a global? I am writing my own authentication system as Codeigniter doesn't come with one.
I've used google search for answers and none of the results helped me.
I am using this tutorial.
Here is config/globals.php
Code:
<?php
// Create customized config variables
$config['web_Address']= 'https://www.formget.com/blog';
$config['title']= 'CodeIgniter Global Variable';
$this ->load->database();
$config['me']= $this->db->query("SELECT * from users WHERE id='$_COOKIE[userid]' && password ='$_COOKIE[pass]'"); $me = $me->row_array();
?>
Here are the errors I get.
Undefined property: CI_Loader::$load on Line 7
Call to a member function database() on null on Line 7
Is there a good way of making a database row a global? I am writing my own authentication system as Codeigniter doesn't come with one.