$mysql_hostname="localhost"; $mysql_database="naveena"; $bd=mysql_connect($mysql_hostname) or die('DB not Connected'); if(!$bd) { echo "Localhost not connected"; } mysql_select_db($mysql_database,$bd); if(!mysql_select_db($mysql_database,$bd)) { echo "DB not connected"; } ?>
$link = mysql_connect('localhost', 'mysql_user', 'mysql_password'); if (!$link) { die('Could not connect: ' . mysql_error()); } echo 'Connected successfully'; mysql_close($link);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)