Forum Moderators: open
how can you check if you already have a conenction to a mysql database?
the php function mysql_ping() looks promising but when you are not connected it tries to conenct for you.
that is not wanted, i just want to check if there is already an open connection to mysql.
preferrably in a php script
grtz
$link = mysql_connect('localhost','username','password');
if($link == FALSE)
{
echo 'Cannot connect to the database';
[url=http://us2.php.net/manual/en/function.exit.php]exit[/url]();
}
Best of luck :)
but i fear that i may have forget a close somewhere or do a erdirect before closing in any of all the scripts
[us2.php.net...]