Welcome Guest, Not a member yet? Register   Sign In
How do I make a database row be a global?
#1

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


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.
Reply


Messages In This Thread
How do I make a database row be a global? - by desbest - 06-26-2017, 04:20 AM



Theme © iAndrew 2016 - Forum software by © MyBB