Solved

JpGraph connect to MySQL

Posted on 2008-06-25
4
1,169 Views
Last Modified: 2013-12-12
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.");
0
Comment
Question by:nzrubin
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 21872573
You will have to check the include ?
0
 
LVL 36

Expert Comment

by:Loganathan Natarajan
ID: 21872577
try to include and print the value  then check it
0
 
LVL 4

Author Comment

by:nzrubin
ID: 21879576
how to do it? include and print the value?
0
 
LVL 36

Accepted Solution

by:
Loganathan Natarajan earned 50 total points
ID: 21881052
i meant,

check the path what you map ..

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

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

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This article discusses four methods for overlaying images in a container on a web page
3 proven steps to speed up Magento powered sites. The article focus is on optimizing time to first byte (TTFB), full page caching and configuring server for optimal performance.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

749 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question