<?php
//database connectivity
$connect_error='Sorry We could not able to connect to the database';
mysql_connect('localhost','root','') or die($connect_error);
mysql_select_db('beehive_intwebpage') or die ($connect_error);
?>
We have this in setup this in our localhost. When there no connection with the database we get the error along with the error message.
Warning: mysql_connect(): No connection could be made because the target machine actively refused it. in D:\core\database\connect.php on line 3
Sorry We could not able to connect to the database
How to show only the message and not the default sql error.
Thanks!