Call db table from any PHP file

Posted on 16th Feb 2014 07:03 pm by admin


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.


No comments posted yet

Your Answer:

Login to answer
61 Like 21 Dislike
Previous forums Next forums
Other forums

help with this code please?

I am trying to build a remote upload script for my image hosting site.

I am usi

finding key position of specified value in multi-dimensional array
Code: $openedfile = fopen($tfc_file4, "r");
$rc = 1;

defining website tags

What would be the best way to define tags for my site, such as website title, url etc.

Array question
Does anyone know how to create a program that takes the $ amount for 8 different departments and gi

I got my hosting suspended XD
So I saw this challenge a day or so ago

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS

Play Free Quiz and Win Cash