Call db table from any PHP file


Posted on 16th Feb 2014 07:03 pm 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

No comments posted yet

Your Answer:

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

rdns with php
I am trying to build a script that will show all of the different domains that are hosted on the sam

List/Menu Box
On an edit page when you want something to select what a user has previously selected from the datab

IP question
ive got 2 ip addresses both global from same user how would i detect if they are local to each other

storing video files into mysql in php
hi

i have my video files in my folder ,
i have to store the path of the videos into db an

Why does this file not return file names that start with numbers?
This file returns a list of filenames to help populate a drop down in my form. For some reason it ig

single page with referrer to show correct page
I have a simple website with a couple of different pages. I would like to be able to in a div tag w

problem with sql querry in php script
Hello guys,

What I want to do is I want to read out a csv file and then but te conent ot the

$_POST
Hi, I have 2 seperate php files, and i want my $_POSt["fname"] To go into both of them, Fo

delete comma
HI,

How to delete "," at the end of the string.
Code: $match = 2009/02/03/a2corr

Production of mango in processing industry
Hi,

We have one scenario ,company is in process industry,they are manufacturing MANGO pul

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