Call db table from any PHP file

Posted on 16th Feb 2014 by admin

Hi,

I want to be able to call a database table that will be setup in another file called init.php, and be able to call it from any PHP file that has init.php included.

Table is called abc_offline and has columns a,b,c in it.

What I am wanting is to be able to call it from any PHP file by:
$offline['a'] for example

How do I do this, I been told I need an array in init.php but I don't know how to do this.

At the moment the init.php has the DB conncect details and some calls to other tables.

Regards

Other forums