I'm writing a functions.php file...now, some functions must access the db. I have a db_connect.php file which contains the connection script. I've included it in functions.php with:
require "sys/db_connect.php";
but how to use the connection script ($con) inside
function a() {
...
}
function c() {
...
}
and so on? I've tried already setting $con variable as global, but no success.