JpGraph connect to MySQL
Posted on 2008-06-25
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:::
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;
$our_db = mysql_connect($db['host'],$db['user'],$db['password'])
or die("Can't connect to database");
@mysql_select_db( $db['database'] ) or die( "Unable to select database. Please contact site administrator.");