JpGraph connect to MySQL

Hello
i use JpGraphs and MySQL to get data.
there is a simple question:
i have a graph.php file that build the graph.. question is if i connect to DB by the include link:::
unclude ("../../../dataBaseInfo.php");
connection doesnt work
but if i put the connection code itself connection works fine...::   WHY is that?
$db['host'] = 'host';
$db['user'] = 'vlad';
$db['password'] = "123456ff" ;
$db['database'] = db_name;
//Connect
$our_db = mysql_connect($db['host'],$db['user'],$db['password'])
      or die("Can't connect to database");
//Choose database
@mysql_select_db( $db['database'] ) or die( "Unable to select database. Please contact site administrator.");
LVL 4
nzrubinAsked:
Who is Participating?
 
Loganathan NatarajanConnect With a Mentor LAMP DeveloperCommented:
i meant,

check the path what you map ..

../
or .../../
or ../../../

which is correct? or path
include ("../../../dataBaseInfo.php");

Open in new window

0
 
Loganathan NatarajanLAMP DeveloperCommented:
You will have to check the include ?
0
 
Loganathan NatarajanLAMP DeveloperCommented:
try to include and print the value  then check it
0
 
nzrubinAuthor Commented:
how to do it? include and print the value?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.