08-31-2017, 01:53 AM
Hello all from Soggy Houston, TX!
I tried this function:
function getConfig ($search='')
{
require_once 'users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
$config = $db->query("select options from config where setting = ?",array($search));
$back = $config->first()->options;
return $back;
}
and received the following errors:
Notice: Undefined variable: abs_us_root in C:\xampp\htdocs\follower\function.php on line 7
Notice: Undefined variable: us_url_root in C:\xampp\htdocs\follower\function.php on line 7
Notice: Undefined variable: db in C:\xampp\htdocs\follower\function.php on line 8
Fatal error: Uncaught Error: Call to a member function query() on null in C:\xampp\htdocs\follower\function.php:8 Stack trace: #0 C:\xampp\htdocs\follower\index.php(11): getConfig('logo') #1 {main} thrown in C:\xampp\htdocs\follower\function.php on line 8
This was to the call of: $set = getConfig('logo');
Can anyone point me where I went wrong?
I tried this function:
function getConfig ($search='')
{
require_once 'users/init.php';
require_once $abs_us_root.$us_url_root.'users/includes/header.php';
$config = $db->query("select options from config where setting = ?",array($search));
$back = $config->first()->options;
return $back;
}
and received the following errors:
Notice: Undefined variable: abs_us_root in C:\xampp\htdocs\follower\function.php on line 7
Notice: Undefined variable: us_url_root in C:\xampp\htdocs\follower\function.php on line 7
Notice: Undefined variable: db in C:\xampp\htdocs\follower\function.php on line 8
Fatal error: Uncaught Error: Call to a member function query() on null in C:\xampp\htdocs\follower\function.php:8 Stack trace: #0 C:\xampp\htdocs\follower\index.php(11): getConfig('logo') #1 {main} thrown in C:\xampp\htdocs\follower\function.php on line 8
This was to the call of: $set = getConfig('logo');
Can anyone point me where I went wrong?